Created
May 31, 2017 14:52
-
-
Save ihrke/c54e8d7c82cd91ae51d1d62f8d29b936 to your computer and use it in GitHub Desktop.
how to use (mc)lapply together with expand.grid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(tidyverse) | |
| effs=seq(0, 1.0, by=0.05) # effect-sizes for which to calculate the design | |
| rscales=c(sqrt(2)/2, 1, sqrt(2)) | |
| pars <- expand.grid(effs, rscales) %>% setNames(c("eff", "rscale")) | |
| pars | |
| lapply(data.frame(t(pars)), function(x) print(x)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment