To install threemc
:
remotes::install_github("mrc-ide/threemc", upgrade = FALSE)
To see how threemc
works for a simple example, please see the relevant vignette.
(largely copied from naomi)
- Make changes in a new branch,
- Run checks (requires
goodpractice
package). Also documents functions withdevtools::check()
. These checks can be run directly from the scriptscripts/goodpractice.R
or from the command line withmake goodpractice
(usemake goodpractice_vignette
if making changes to vignettes, which are very slow to build), - When branch is ready for merging create a PR and add a reviewer,
- Ensure that the version number has been updated according to semantic versioning and add a news item describing the change, and
- Reviewer should check code and ensure the build passes on Buildkite before merging.
Additionally:
- Wherever possible, add arguments for optional new functionality, with old functionality as default,
- If changing
threemc_aggregate
orthreemc_ppc
(the slowest "purely R" functions in this package), a before vs after profiling would be useful, using e.g.profvis
, - Follow the tidverse styleguide as much as
possible, but at least have your commits pass the call to
lintr
fromgoodpractice
, - Ensure that git commits (and R comments) are in the imperative case (see here for Tim Pope's rational behind this),
- To avoid notes from
devtools::check()
when using non-standard evaluation (NSE),- in
dplyr
, refer to all columns withrlang::`.data`
, e.g..data$col
, - in
data.table
, assign columns referenced in NSE to the value NULL at the beginning of a function (seethreemc_ppc
for an example).
- in
MIT © Imperial College of Science, Technology and Medicine