How to automatically load settings in R on OSX? How to find R_HOME, configure Rprofile.site, etc?

前端 未结 3 794
清歌不尽
清歌不尽 2021-01-31 00:04

I have a Macintosh and I am trying to automatically load packages, homemade functions, and use modified setting every time I start R. I believe this can be done with a file call

3条回答
  •  逝去的感伤
    2021-01-31 00:36

    If you run getwd(), then you will see your R startup directory. On a mac it is typically /User/login_name That is where I leave my .RProfile where I load custom functions and also frequently used packages.

    Also see: Useful little functions in R (to put in your .RProfile) and Expert R users, what's in your .Rprofile?…

提交回复
热议问题