Learn R Programming

mergen (version 0.2.1)

extractInstallPkg: extract package names and install them

Description

This function extracts all package names that are needed to run the code returned by the agent and installs them as needed.

Usage

extractInstallPkg(code)

Value

final status of the packages as a logical vector, TRUE if packages is already installed or could be installed. FALSE if the package can't be install.

Arguments

code

code block returned by the agent.

Examples

Run this code
# \donttest{
# Check code for packages that need installing
code <- "library(devtools)\n x<-5"
extractInstallPkg(code)
# }

Run the code above in your browser using DataLab