1

I would like R to run a script anytime I start up R. I am using R on a Linux cluster and I do not have access to R installation and the .Rprofile file and I cannot find it either. I can run R and have my local packages/libraries. For example, I would like to set the lib paths each time R is started.

.libPaths("path")

Is it possible to define and set a path for a custom startup script file?

In a non-interactive session, I could do in Bash something like

Rscript script.R

and my script.R has

.libPaths('path')
...
more code
...
mindlessgreen
  • 11,059
  • 16
  • 68
  • 113

0 Answers0