Skip to content

Instantly share code, notes, and snippets.

@gitfvb
Created January 24, 2017 08:53
Show Gist options
  • Save gitfvb/277f40a36a2220410006e570cdd03e35 to your computer and use it in GitHub Desktop.
Save gitfvb/277f40a36a2220410006e570cdd03e35 to your computer and use it in GitHub Desktop.
Load scripts into R at startup (especially needed for Rserve) - overwrite file in etc/
# Things you might want to change
# options(papersize="a4")
# options(editor="notepad")
# options(pager="internal")
# 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://my.local.cran"
# options(repos=r)})
# Give a fortune cookie, but only to interactive sessions
# (This would need the fortunes package to be installed.)
# if (interactive())
# fortunes::fortune()
.First <- function(){
lapply(list.files(path = "C:/FastStats/R/Scripts/", pattern = "(?i)[.]r$", recursive = TRUE, full.names = TRUE), source)
lapply(list.files(path = "C:/FastStats/Publish/Reisen/public/R/", pattern = "(?i)[.]rscript$", recursive = TRUE, full.names = TRUE), source)
}
# library(Hmisc)
# library(R2HTML)
# cat("/nWelcome at", date(), "/n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment