Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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())))  
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #rstudio #find #package #installed
ADD COMMENT
Topic
Name
5+1 =