Hello, I was looking at the R (installed on RHEL6) shell script and saw R_HOME_DIR=/usr/lib64/R. Nowhere (and I could have got it wrong) does it read in the environment value R_HOME_DIR. I have the need to rsync the entire folder below /usr/lib64/R to another computer into another directory location. Without changing the R shell script, how can i force it read in R_HOME_DIR? Or maybe i misunderstood the bash source? (Note, i cannot recompile on target machine) Cheers Saptarshi 1. I also realize Rscript will not work (i think path is hard coded in the source) Beginning of /usr/lib64/R/bin/R R_HOME_DIR=/usr/lib64/R if test "${R_HOME_DIR}" = "/usr/lib64/R"; then case "linux-gnu" in linux*) run_arch=`uname -m` case "$run_arch" in x86_64|mips64|ppc64|powerpc64|sparc64|s390x) libnn=lib64 libnn_fallback=lib ;; *) libnn=lib libnn_fallback=lib64 ;; esac if [ -x "/usr/${libnn}/R/bin/exec/R" ]; then R_HOME_DIR=/usr/lib64/R elif [ -x "/usr/${libnn_fallback}/R/bin/exec/R" ]; then R_HOME_DIR=/usr/lib64/R ## else -- leave alone (might be a sub-arch) fi ;; esac fi [[alternative HTML version deleted]]
p_connolly at slingshot.co.nz
2013-Apr-26 01:26 UTC
[R] Transferring R to another computer, R_HOME_DIR
Quoting Saptarshi Guha <saptarshi.guha at gmail.com>:> Hello, > > I was looking at the R (installed on RHEL6) shell script and saw > R_HOME_DIR=/usr/lib64/R. Nowhere (and I could have got it wrong) does > it read in the environment value R_HOME_DIR. I have the need to rsync > the entire folder below /usr/lib64/R to another computer into another > directory location. Without changing the R shell script, how can i > force it read in R_HOME_DIR? > > Or maybe i misunderstood the bash source? > > (Note, i cannot recompile on target machine)If you can't compile on the target machine, that indicates that you wouldn't have access to /usr/lib64/R anyway, so you need a different approach. Fortunately, it's easy to compile into your home directory where you do have write access. The INSTALL file in the distributed tar.gz file shows you how to compile where you want and what link you need to make it accessible. Even though the file is called INSTALL, it explains how it's not necessary to install R in order to use it. HTH> > Cheers > Saptarshi > > 1. I also realize Rscript will not work (i think path is hard coded in the > source) > > Beginning of /usr/lib64/R/bin/R > > R_HOME_DIR=/usr/lib64/R > if test "${R_HOME_DIR}" = "/usr/lib64/R"; then > case "linux-gnu" in > linux*) > run_arch=`uname -m` > case "$run_arch" in > x86_64|mips64|ppc64|powerpc64|sparc64|s390x) > libnn=lib64 > libnn_fallback=lib > ;; > *) > libnn=lib > libnn_fallback=lib64 > ;; > esac > if [ -x "/usr/${libnn}/R/bin/exec/R" ]; then > R_HOME_DIR=/usr/lib64/R > elif [ -x "/usr/${libnn_fallback}/R/bin/exec/R" ]; then > R_HOME_DIR=/usr/lib64/R > ## else -- leave alone (might be a sub-arch) > fi > ;; > esac > fi > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > 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.
Well, to my understanding, you planned to rsync the original compiled folder from one machine to somewhere on another machine, and work with it. Then how about create a file link on the second machine for "/usr/lib64/R"? Or maybe I misunderstand your purpose? On Thu, Apr 25, 2013 at 5:57 PM, Saptarshi Guha <saptarshi.guha@gmail.com>wrote:> Hello, > > I was looking at the R (installed on RHEL6) shell script and saw > R_HOME_DIR=/usr/lib64/R. Nowhere (and I could have got it wrong) does > it read in the environment value R_HOME_DIR. I have the need to rsync > the entire folder below /usr/lib64/R to another computer into another > directory location. Without changing the R shell script, how can i > force it read in R_HOME_DIR? > > Or maybe i misunderstood the bash source? > > (Note, i cannot recompile on target machine) > > Cheers > Saptarshi > > 1. I also realize Rscript will not work (i think path is hard coded in the > source) > > Beginning of /usr/lib64/R/bin/R > > R_HOME_DIR=/usr/lib64/R > if test "${R_HOME_DIR}" = "/usr/lib64/R"; then > case "linux-gnu" in > linux*) > run_arch=`uname -m` > case "$run_arch" in > x86_64|mips64|ppc64|powerpc64|sparc64|s390x) > libnn=lib64 > libnn_fallback=lib > ;; > *) > libnn=lib > libnn_fallback=lib64 > ;; > esac > if [ -x "/usr/${libnn}/R/bin/exec/R" ]; then > R_HOME_DIR=/usr/lib64/R > elif [ -x "/usr/${libnn_fallback}/R/bin/exec/R" ]; then > R_HOME_DIR=/usr/lib64/R > ## else -- leave alone (might be a sub-arch) > fi > ;; > esac > fi > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > 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. >[[alternative HTML version deleted]]
Reasonably Related Threads
- let R and Rscript infer paths from their own location (PR#14007)
- The Environment variables settings in bin/R, why do they ignore environment variables of the same name?
- Lines between panels in lattice
- Crash due to extreme example
- Y-axis label on the right hand side in lattice?