ohdsi-studies / PioneerWatchfulWaiting

This study is part of the joint PIONEER - EHDEN - OHDSI studyathon in March 2021, and aims to advance understanding of clinical management and outcomes of watchful waiting in prostate cancer.
Apache License 2.0
7 stars 18 forks source link

Make sure users are using the correct package versions #8

Closed scossin closed 3 years ago

scossin commented 3 years ago

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.

msuchard commented 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

keesvanbochove commented 3 years ago

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.