Take a snapshot of the R environment

takeEnvironmentSnapshot(rootPackage)

Arguments

rootPackage

The name of the root package

Value

A data frame listing all the dependencies of the root package and their version numbers, in the order in which they should be installed.

Details

This function records all versions used in the R environment that are used by one root package. 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

snapshot <- takeEnvironmentSnapshot("OhdsiRTools")
snapshot
#>        package version
#> 1            R   4.2.0
#> 2    grDevices   4.2.0
#> 3     graphics   4.2.0
#> 4        utils   4.2.0
#> 5        stats   4.2.0
#> 6          sys     3.4
#> 7      askpass     1.1
#> 8      methods   4.2.0
#> 9        tools   4.2.0
#> 10          R6   2.5.1
#> 11        curl   4.3.2
#> 12    jsonlite   1.8.0
#> 13        mime    0.12
#> 14     openssl   2.0.0
#> 15     RJSONIO 1.3-1.6
#> 16   codetools  0.2-18
#> 17     formatR    1.12
#> 18        httr   1.4.3
#> 19     remotes   2.4.2
#> 20 OhdsiRTools   2.0.2