Skip to content

Instantly share code, notes, and snippets.

@gitfvb
Created December 3, 2020 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gitfvb/a5663c9f8da799bf178a045559e93047 to your computer and use it in GitHub Desktop.
Save gitfvb/a5663c9f8da799bf178a045559e93047 to your computer and use it in GitHub Desktop.
R profile file for including some scripts at startup
# 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/autoexec/", 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("Welcome at the apteco r integration at ", date(), "")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment