- Notifications
You must be signed in to change notification settings - Fork0
An R package to simulate data from JAGS or R Code
License
poissonconsulting/sims
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
sims is an R package to generate datasets from R orJAGS code for use in simulationstudies. The datasets are returned as annlists object and/or savedto file as individual .rds files. Parallelization is implemented usingthefuture package.Progress is reported using theprogressr package.
You can install the released version of sims fromCRAN with:
install.packages("sims")And the development version fromGitHub with:
# install.packages("remotes")remotes::install_github("poissonconsulting/sims")
By default,sims_simulate() returns the simulated datasets in the formof annlists object.
library(sims)set.seed(10)sims_simulate("a <- runif(1)",nsims=2L)#> $a#> [1] 0.2213763#>#> an nlists object of 2 nlist objects each with 1 numeric element
If, however,save = TRUE then each nlist object is saved as an.rdsfile inpath.
set.seed(10)sims_simulate("a <- runif(1)",nsims=2L,save=TRUE,path= tempdir(),exists=NA)#> [1] TRUEsims_data_files(tempdir())#> [1] "data0000001.rds" "data0000002.rds"sims_data(tempdir())#> $a#> [1] 0.2213763#>#> an nlists object of 2 nlist objects each with 1 numeric element
For more information see theGetStartedvignette.
Please report anyissues.
Pull requests arealways welcome.
Please note that the sims project is released with aContributor CodeofConduct.By contributing to this project, you agree to abide by its terms.
About
An R package to simulate data from JAGS or R Code
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Languages
- R100.0%