| capture_environment | R Documentation |
Records the facts a replicator needs to rebuild the session: R version, platform, operating system, a UTC timestamp, and the versions of the requested packages.
capture_environment(packages = loadedNamespaces())
packages |
Character vector of package names to record. Defaults to every currently loaded namespace. |
A list with r_version, platform, os, captured_utc,
and packages (a named character vector of versions).
# Record specific packages' versions alongside the session facts.
env <- capture_environment(c("stats", "utils"))
env$r_version
env$os
env$packages # named character vector of versions
# Default captures every currently loaded namespace.
names(capture_environment())[1:4]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.