I've read this several time now but I'm still not sure I understand fully what your are trying to achieve. But in principle I would put a switch in the file ...
if (it's one server) { PREFIX <- "A" } if (it's the other server) { PREFIX <- "B" } ... or whatever and then source(paste(PREFIX, "_startupScript.R", sep="")) or something along these lines. If that's not what you need, you'll need to explain it better. B. On Jan 29, 2016, at 5:24 PM, Divakar Reddy <divakarredd...@gmail.com> wrote: > 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@xyz etc]$ pwd > /usr/lib64/R/etc > [abc@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]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.