TwoSampleMR 0.6.30
Some optimizations to the code, including:
- Vectorised
mr_egger_regression_bootstrap() - Vectorised
weighted_median_bootstrap() - Deleted duplicated
weighted_median()function - Replace plyr function calls with data.table function calls
plyr::rbind.fill(...)todata.table::rbindlist(..., fill = TRUE, use.names = TRUE)plyr::ddply(dat, cols, func)tolapply()over unique combinations +data.table::rbindlist()- Added
data.table::setDF()calls to convert back to data.frame for compatibility - And removed plyr from Imports list
- In
flip_alleles()usechartr()instead of 4gsub()calls - In
random_string()use single call tosample()instead of n calls - Optimized
mr_mode() - Replaced
apply(..., any(is.na()))withcomplete.case() - Optimized the
mr()function - Optimized the
Optimize get_r_from_lor()function - Optimized the
mr_rucker_bootstrap()andmr_rucker_jackknife_internal()functions - Replaced
sapply()withvapply()in several cases - Optimized the
simple_cap()function - And a few other minor optimizations