====== ADC's Rprofile.site file for Windows ====== <2014.3.10> Based on two sources: http://www.statmethods.net/interface/customizing.html http://stackoverflow.com/questions/1189759/expert-r-users-whats-in-your-rprofile ---- #added by ADC 2014.3.10 setwd("C:/Users/acate/Documents/") # set the default help type options(help_type="text") # options(help_type="html") # set a site library # .Library.site <- file.path(chartr("\\", "/", R.home()), "site-library") # set a CRAN mirror local({r <- getOption("repos") r["CRAN"] <- "http://watson.nci.nih.gov/cran_mirror" options(repos=r) rm(r)}) #added by ADC 2014.3.10 if (Sys.getenv("R_HISTFILE") == "") { #orig line: #Sys.setenv(R_HISTFILE=file.path("~", ".Rhistory")) Sys.setenv(R_HISTFILE=("C:/Users/acate/.Rhistory")) } #added by ADC 2014.3.10 .First <- function(){ library(lme4) library(MASS) try(loadhistory(Sys.getenv("R_HISTFILE"))) cat("\n Rrrr! The statistics program for Pirates !\n\n") cat("\nWelcome at", date(), "\n") } #added by ADC 2014.3.10 .Last <- function(){ if (!any(commandArgs()=='--no-readline') && interactive()){ require(utils) timestamp(,prefix=paste("##------ [",getwd(),"] ",sep="")) try(savehistory(Sys.getenv("R_HISTFILE"))) } cat("\n Rrrr! Avast Ye, YO HO!\n\n") cat("\nGoodbye at ", date(), "\n") }