Answers for "rstudio find out if package is installed"

0

rstudio find out if package is installed

#Easy way to check if packages are already installed in RStudio
packages <- c("ggplot2", "dplyr", "Hmisc", "lme4", "arm", "lattice", "lavaan")
if (length(setdiff(packages, rownames(installed.packages()))) > 0) {
  install.packages(setdiff(packages, rownames(installed.packages())))  
}
Posted by: Guest on November-09-2020

Code answers related to "rstudio find out if package is installed"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language