If a package is not available in the R library, attempt to install it from CRAN. Unlike previous versions of automagic, if the packages is not available on CRAN, the function will return an error (instead of trying to install from GitHub). If R is running interactively, then the user will be prompted before installing.
a character vector with the names of packages to install from CRAN
install even if package is in library (warning! this could install a newer or older version of an already installed package)
prompt the user to install a package (defaults to yes if the R session is interactive)
@details This function does not check package versions. Specify
force_install=TRUE to force installation of the package, updating it
to the latest available version. Note that this function attempts to
install its packages based on a best guess and is meant for use in
automatically setting up an R programming environment. Do not use for
installing packages if you have the option to install from a
installing version specific packages based on a local R library.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.