Store snapshot of the R environment in the package

insertEnvironmentSnapshotInPackage(
  rootPackage,
  pathToCsv = "inst/settings/rEnvironmentSnapshot.csv"
)

Arguments

rootPackage

The name of the root package

pathToCsv

The path for saving the snapshot (as CSV file).

Details

This function records all versions used in the R environment that are used by one root package, and stores them in a CSV file in the R package that is currently being developed. The default location is inst/settings/rEnvironmentSnapshot.csv.This can be used for example to restore the environment to the state it was when a particular study package was run using the restoreEnvironment function.

Examples

if (FALSE) {
insertEnvironmentSnapshotInPackage("OhdsiRTools")
}