epiverse-trace / cleanepi

R package to clean and standardize epidemiological data
https://epiverse-trace.github.io/cleanepi/
Other
8 stars 3 forks source link

Installing package in README #183

Closed joshwlambert closed 1 month ago

joshwlambert commented 1 month ago

The README currently installs the package when rendered https://github.com/epiverse-trace/cleanepi/blob/main/README.Rmd#L74-L78. I would recommend turning the evaluation of this code chunk off (either with eval=FALSE or using ```r instead of ```{r}.

You could also use require() instead of !("pak" %in% rownames(installed.packages())) if you wanted to simplify the if statement on whether to install. See here an example copied from the {epiparameter} README.

# check whether {pak} is installed
if(!require("pak")) install.packages("pak")
pak::pak("epiverse-trace/epiparameter")