Skip to content

Instantly share code, notes, and snippets.

@SwampThingPaul
Last active January 7, 2019 13:36
Show Gist options
  • Save SwampThingPaul/d37b222e4fa0f9b72d247c9c79e5b7fd to your computer and use it in GitHub Desktop.
Save SwampThingPaul/d37b222e4fa0f9b72d247c9c79e5b7fd to your computer and use it in GitHub Desktop.
Package installer helper
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