0

I got cluster account from my college, and got installed R 2.13.0 in linux cluster(redhat 2.6.18-128.el5). I followed the below step to get the latest version of R

Step 1: download latest version of R from the following link : https://cran.r-project.org/sources.html(i downloaded R-3.2.2)

Step 2: upload it into your cluster(I'm using WinSCP in windows 8.1)

Step 3: unpack it using the following command tar -xf R-x.y.z.tar.gz

in my case its tar -xf R-3.2.2.tar.gz

Step 4: go to that directory using the code cd R-3.2.2

Step 5: type ./configure

Step 6: after the completion of config, type make

Step 7: Then check the built system works correctly by make check

Then I typed R, it's just loading R-2.13.0 only. Even I entered the R-3.2.2 folder(bin) and tried, still it's not loading new version.

I don't have any sudoers rights(Administrator privileges). cluster is having 32 nodes.

Is there any way to overcome this?? Thanks

bibinwilson
  • 348
  • 2
  • 6
  • 20
  • 1
    When you say, "I entered the R-3.2.2 folder(bin) and tried", did you just enter `R` in that directory, or did you type `./R`? In the former case R 2.13.0 will be run regardless of what directory you are in because it's on your `PATH` variable; to run a different R you will need to specify the exact location of that executable (`./R` if you are in the `[...]/bin/` directory). – nrussell Nov 15 '15 at 15:13
  • @nrussell.. thank you so much.. Now its working. I don't even have internet access in the cluster. So I'm using 'R CMD INSTALL' . but it's installing to the old version. How can I install packages in the new version – bibinwilson Nov 15 '15 at 16:27
  • Well, if you are typing `R CMD INSTALL`, most likely R 2.13.0 is being called for the same reason noted in my first comment (the `R` in `R CMD INSTALL` is the `R` executable on your `PATH`). There are different ways to handle this, but considering you don't have admin rights on the machine, you can try creating a symbolic link to override the `R` on your `PATH`. Type `ln -s /path/to/newer/version/bin/R R`, e.g. the full path to R 3.2.2. – nrussell Nov 15 '15 at 16:48
  • I typed `ln -s /R-3.2.2/bin/R R` , I got the below msg. `ln: creating symbolic link 'R/R' to '/R-3.2.2/bin/R: File exists` I tried R CMD INSTALL also but again going to the old version – bibinwilson Nov 15 '15 at 17:01
  • Try `export PATH=/path/to/R-3.2.2/bin:$PATH` (replace `/path/to` accordingly). – nrussell Nov 15 '15 at 17:10
  • @nrussell.. thank you so so so much.. I owe you a lot.. It's working now – bibinwilson Nov 15 '15 at 17:19
  • You're welcome; note that this may not be a permanent solution though - e.g. if the machine is rebooted you may have to run the `export ....` command again. I would suggest you contact on of the admins for the machine and ask them to help you fix your `PATH` permanently or replace the older R with the newer version. – nrussell Nov 15 '15 at 17:25
  • Ok. Is there any way to download all dependencies for a particular package to use `R CMD INSTALL` to install R packages? since my cluster is not having internet access, it's getting difficult to find dependencies and downloading them. – bibinwilson Nov 15 '15 at 17:38
  • 1
    @bibinwilson http://stackoverflow.com/a/33261949/1412059 – Roland Nov 15 '15 at 18:08

0 Answers0