Closed scossin closed 3 years ago
This verification is now standard practice in the estimation packages I help write. So, feel free to reuse this code: https://github.com/ohdsi-studies/ScyllaEstimation/blob/0bb1b4f1af4d37c8bf1d7f7f8cb7677f689ba6c9/R/Main.R#L103
This should be addressed by the the installation procedure (when the package is installed using install_github). However, verifyDependencies() is also added to CodeToRun.R in case people are running the package directly from source.
Having renv.lock file is great but some users just open the "CodeToRun.R" file (opening the .Rproj file doesn't work on their rstudio server) and there's no warning they are executing the script with the wrong environment. Maybe we can add something in the "CodeToRun.R" script at the beginning to check the package dependencies are being handled by the renv.lock file.