[R] help on Rprofile.site

Divakar Reddy divakarreddy.a at gmail.com
Fri Jan 29 23:24:51 CET 2016


Hi All,


Issue:
we are running issues with RStudio like crash and packages not found.

Root Cause:
Sharing a home directory between two servers( we installed RStudio on two
servers and both are sharing same home directory).

Our Solution:
Create separate home directories on both RStudio servers and ensure that
both are not sharing same profile files like .rstudio/Rhistory
Current Home directories location: /home/user/
Proposed Home directory: /home/user/Ser1 & /home/user/Ser17 for both servers

In-order to achieve this I'm trying to set new home directory on both
servers to store .rstudio files separately.

[abc at xyz etc]$ pwd
/usr/lib64/R/etc
[abc at xyz etc]$ cat Rprofile.site
.First <- function() cat("n Welcome to R!nn")
# get the System USER variable and set it to the R variable u
u <- Sys.getenv("USER")
# use file.path() to set the file path using the USER variable
u.path <- file.path("/home", u, "Ser17")
# change the working directory to the set file path
#setwd(u.path)
.Last <- function() cat("n Goodbye!nn")

Here I don't want to change the Working directory and looking to change
only home directory to store profile files which are used while starting R.

Could you please suggest me on this?

Thanks,
Divakar
Hadoop Administrator,
Phoenix,USA

	[[alternative HTML version deleted]]



More information about the R-help mailing list