Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
My .Rprofile that works both on Windows and Linux
# .Rprofile -- commands in this file will be executed at the beginning of
# each R session. On Windows, the R_PROFILE environment variable must have value
# with the full path to this file. On Linux (or other Unix like systems) this file
# must be in the user's home directory.
# Set the default repository to the main CRAN site
# Set the oDrive varaible and library path
if(['sysname'] == 'Windows') {
oDrive = 'o:/'
.libPaths(paste(oDrive, 'R/library/Windows', sep=''))
require(utils, quietly=TRUE)
print("Setting memory limit for R to 4GB...")
memory.limit(size=4095) #Set to 4GB (for 64-bit Windows, this can be much larger)
message(paste('R_LIBS: ', Sys.getenv('R_LIBS'), sep=''))
message(paste('R_PROFILE: ', Sys.getenv('R_PROFILE'), sep=''))
} else if(['sysname'] == 'Linux') {
oDrive = '/n01/OutcomesAssessment/'
.libPaths(paste(oDrive, 'R/library/Linux', sep=''))
} else if(['sysname'] == 'Darwin') {
oDrive = NULL
# Customize the default look and feel of ggplot2
if(require(ggplot2, quietly=TRUE)) {
# On Linux we will alter the default behavior of the makeR package.
if(['sysname'] == 'Linux') {
if(require(makeR, quietly=TRUE)) {
# Change the location of the SQL repository
if(require(irutils, quietly=TRUE)) {
setSQLRepos(paste(oDrive, 'R/ecir/data', sep=''))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.