clean_session: Obtains a sessionInfo
from a local R session
Description
The function may also execute provided expressions or files.
The implementation is based on r_vanilla
.
Usage
clean_session(expr = c(), script_file = NULL, rmd_file = NULL,
echo = FALSE, predetect = TRUE,
repos = "https://cloud.r-project.org")
Arguments
expr
vector of expressions to be executed in the session (see quote
)
script_file
R script to be executed in the session, uses source
rmd_file
R Markdown file to rendered in the session, uses render
echo
print out detailed information from R
predetect
whether to use automagic to install missing packaging before executing the R script or R Markdown file
repos
Repository to use, requried if expr
incluedes install statements
Examples
Run this code# NOT RUN {
clean_session(c(quote(library('lattice'))))
# }
Run the code above in your browser using DataLab