I want R to load a certain file on initialization, so naturally I added a source
command to my Rprofile so:
.First <- function()
{
cat("\n Welcome to R MotherFnorder!!!\n\n")
setwd("/home/username/Code/R/")
source("/home/username/Code/R/file.R")
}
But now when I start R
it throws a 'function not found' error for default functions like runif
or rnorm
. When I load the same file manually into the workspace I get no errors.