install_package_guess {automagic}R Documentation

Install latest version of package from CRAN


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.


install_package_guess(pkg, force_install = FALSE,
  prompt = interactive())



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 deps.yaml file. See make_deps_file and install_deps_file for installing version specific packages based on a local R library.

[Package automagic version 0.5.1 Index]