Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install basic set of R packages
.libPaths() #By default, R will install packages to the first element
#This script will install some very common R packages.
repos = 'http://cran.r-project.org' #Main CRAN
repos.win = 'http://www.stats.ox.ac.uk/pub/RWin' #Site provides some prebuilt binaries for Windows
repos.rforge = 'http://r-forge.r-project.org'
libraries = c('Deducer', 'devtools', 'doBy', 'foreign', 'gdata', 'ggplot2', 'gmaps',
'Hmisc', 'JGR', 'maps', 'mapdata', 'mapproj', 'maptools', 'proto', 'psych', 'R2wd',
'Rcmdr', 'RCurl', 'reshape', 'RODBC', 'roxygen2', 'seqinr', 'sm', 'sp',
'sqldf', 'survey', 'WriteXLS', 'XML', 'xtable')
if(Sys.info()['sysname'] == 'Windows') {
oDrive = 'o:/'
memory.limit(size=4095) #Set to 4GB (for 64-bit Windows, this can be much larger)
install.packages(libraries, repos=c(repos, repos.win), type='win.binary', dep=TRUE)
install.packages('qualtrics', repos=c(repos.rforge, repos, repos.win))
} else if(Sys.info()['sysname'] == 'Darwin') {
oDrive = NULL
install.packages(libraries, repos=c(repos), type='mac.binary.leopard', dep=TRUE)
install.packages('qualtrics', repos=c(repos.rforge, repos))
} else if(Sys.info()['sysname'] == 'Linux') {
oDrive = '/n01/OutcomesAssessment/'
install.packages(libraries, repos=c(repos), type='source', dep=TRUE)
install.packages('qualtrics', repos=c(repos.rforge, repos))
} else {
stop('Unsupported operating system!')
}
library(devtools)
install_github('irutils', 'jbryer')
install_github('ruca', 'jbryer')
install_github('ipeds', 'jbryer')
library(ipeds)
data(surveys)
downloadAllSurveys(2010)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.