search for: install_if_missing

Displaying 2 results from an estimated 2 matches for "install_if_missing".

2024 Sep 23
2
Loading multiple packages with install.packages()...
If you can get a vector with all the package names (I do not know how to do this) then you could do something like this; # Function to check and install missing packages install_if_missing <- function(pkg) { if (!require(pkg, character.only = TRUE)) { install.packages(pkg, dependencies = TRUE) } library(pkg, character.only = TRUE) } # List of required packages. packages <- c("emmeans", "multcomp", "sandwich", "multcompView", &qu...
2024 Sep 23
1
Loading multiple packages with install.packages()...
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi folks: Curious question. I've added Rcmdr to my setup (R 4.4.1). I would like to add all of the plugins. Is there a way to get install.packages() to gather up everything starting 'rcmdrplugin', or do I have to list each package individually between the brackets?? ?? Regards... - -- Brian Lunergan Russell, Ontario Canada -----BEGIN