This repository contains the information used to calculate the schedules for the multi-site precipitation experiment. In includes all original data, R code for fitting the distribution of rainfall and producing the schedules. It also contains the schedules themselves and all diagnostics.
This is a very substantial compendium and I have little familiarity with the domain, so I might be a bit off the mark here, but a quick glance over it suggest that it could be organised into the structure of an R package. I made a quick sketch of one possible package structure here: https://github.com/benmarwick/precipitation_experiment_schedule_package. This sketch builds but doesn't pass the check because I didn't update the source lines and other file path operations that are in all the R and Rmd files.
The main changes to conform to a package structure are:
add as DESCRIPTION file that takes care of loading dependent packages
put each location directory into the data/ directory, since they mostly contain data objects
take out the Rmd file for each location, rename, and treat as a vignette and put together in the vignettes/ directory'. They seem to have narrative text and plots, so similar to vignettes
put all the *.R files together in the R/ directory, rename one file so it get loaded before the others and the function dependencies are ok. This makes the functions in these files available to all the Rmd files in the vingettes/ directory
put notes and emails in the inst/ directory (though they could go in vignettes/ also)
It looks like a tremendous amount of work has gone into assembling the compendium as it is, so I'm not suggesting you change anything - this sketch is more of a conversation piece than a concrete recommendation. I am mostly curious to know your perspective as the domain expert about what the downsides would be with this kind of package-like organization of the compendium, so we can better understand the limits of R packages for research compendia
This is a very substantial compendium and I have little familiarity with the domain, so I might be a bit off the mark here, but a quick glance over it suggest that it could be organised into the structure of an R package. I made a quick sketch of one possible package structure here: https://github.com/benmarwick/precipitation_experiment_schedule_package. This sketch builds but doesn't pass the check because I didn't update the
source
lines and other file path operations that are in all theR
andRmd
files.The main changes to conform to a package structure are:
data/
directory, since they mostly contain data objectsRmd
file for each location, rename, and treat as a vignette and put together in thevignettes/
directory'. They seem to have narrative text and plots, so similar to vignettes*.R
files together in theR/
directory, rename one file so it get loaded before the others and the function dependencies are ok. This makes the functions in these files available to all theRmd
files in thevingettes/
directoryinst/
directory (though they could go invignettes/
also)It looks like a tremendous amount of work has gone into assembling the compendium as it is, so I'm not suggesting you change anything - this sketch is more of a conversation piece than a concrete recommendation. I am mostly curious to know your perspective as the domain expert about what the downsides would be with this kind of package-like organization of the compendium, so we can better understand the limits of R packages for research compendia