Last active
January 7, 2019 13:36
-
-
Save SwampThingPaul/d37b222e4fa0f9b72d247c9c79e5b7fd to your computer and use it in GitHub Desktop.
Package installer helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packs=c("sp","rgdal","gstat","raster","spatstat","maptools","rgeos","tmap","GISTools","rasterVis","spdep","spsurvey") | |
for(i in 1:length(packs)){ | |
test=packs[i] %in% rownames(installed.packages()) | |
if(test==T){print("package already installed")}else{install.packages(packs[i])} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment