Last updated: 2018-07-17

workflowr checks: (Click a bullet for more information)
  • R Markdown file: uncommitted changes The R Markdown is untracked by Git. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

  • Environment: empty

    Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

  • Seed: set.seed(20180716)

    The command set.seed(20180716) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

  • Session information: recorded

    Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

  • Repository version: 54a8a35

    Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility. The version displayed above was the version of the Git repository at the time these results were generated.

    Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
    
    Ignored files:
        Ignored:    .DS_Store
        Ignored:    .Rproj.user/
        Ignored:    analysis/.DS_Store
        Ignored:    code/.DS_Store
        Ignored:    data/.DS_Store
        Ignored:    docs/.DS_Store
        Ignored:    figures/
    
    Untracked files:
        Untracked:  .drake/
        Untracked:  analysis/model_functions.Rmd
        Untracked:  analysis/plot_model.Rmd
        Untracked:  analysis/run_model.Rmd
        Untracked:  data/mating_type_tables/
        Untracked:  data/sim_results/
        Untracked:  manuscript/
        Untracked:  output/my_manuscript.pdf
        Untracked:  output/supplementary_material.pdf
        Untracked:  run.R
        Untracked:  sex_shredder.Rproj
        Untracked:  sim_results/
    
    Unstaged changes:
        Modified:   analysis/_site.yml
        Modified:   analysis/index.Rmd
        Deleted:    myproject.Rproj
    
    
    Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


Attaching package: 'dplyr'
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

Attaching package: 'reshape2'
The following object is masked from 'package:tidyr':

    smiths

Define the parameter space

parameters <- expand.grid(
  generations = 1000,
  W_shredding_rate = c(0, 0.95),
  Z_conversion_rate = c(0, 0.95),
  Zr_creation_rate = c(0, 0.01, 0.1),
  Zr_mutation_rate = c(0.0, 0.0001),
  Wr_mutation_rate = c(0.0, 0.0001),
  cost_Zdrive_female = c(0.01, 0.01, 0.5),
  cost_Zdrive_male = 0.01,
  cost_Wr = 0.01,
  cost_Zr = 0.01,
  cost_A = 0.01,
  cost_B = 0.01,
  n_patches = 20,
  male_migration_prob = c(0.01, 0.5),
  female_migration_prob = c(0.01, 0.5),
  max_fecundity = 20,
  softness = c(0, 0.5, 1),
  male_weighting = 1,
  density_dependence_shape = 0.5,
  carrying_capacity = 10000,
  initial_pop_size = 5000,
  initial_Zdrive = 0.05,
  initial_Zr = 0.01,
  initial_Wr = 0.00,
  initial_A = 0.00,
  initial_B = 0.00,
  realisations = 1:100
)

Run the model on each parameter space

do_all_parameters(parameters, over_write = FALSE, cores = 6)
Warning in mclapply(i, fun, cores): all scheduled cores encountered errors
in user code
[1] "Done all parameters"
combine_results_files() %>% saveRDS(file = "data/all_results.rds")

Session information

sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.4

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
[1] bindrcpp_0.2.2 reshape2_1.4.3 stringr_1.3.1  tidyr_0.8.1   
[5] purrr_0.2.5    dplyr_0.7.6   

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.17      rstudioapi_0.7    knitr_1.20       
 [4] bindr_0.1.1       whisker_0.3-2     magrittr_1.5     
 [7] workflowr_1.1.1   tidyselect_0.2.4  R6_2.2.2         
[10] rlang_0.2.1       plyr_1.8.4        tools_3.5.1      
[13] R.oo_1.22.0       git2r_0.22.1      htmltools_0.3.6  
[16] yaml_2.1.19       rprojroot_1.3-2   digest_0.6.15    
[19] assertthat_0.2.0  tibble_1.4.2      crayon_1.3.4     
[22] R.utils_2.6.0     glue_1.2.0        evaluate_0.10.1  
[25] rmarkdown_1.10    stringi_1.2.3     pillar_1.3.0     
[28] compiler_3.5.1    backports_1.1.2   R.methodsS3_1.7.1
[31] pkgconfig_2.0.1  

This reproducible R Markdown analysis was created with workflowr 1.1.1