R: Startup script on cluster

吃可爱长大的小学妹 提交于 2020-04-30 06:10:44

问题


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
...

来源:https://stackoverflow.com/questions/37838721/r-startup-script-on-cluster

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!