User Tools

Site Tools


r

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
r [2022/12/07 16:08]
root
r [2022/12/07 16:17] (current)
root
Line 1: Line 1:
 === R === === R ===
  
-The "R" statistical/programming package is installed on the clusters.  The greatest number of add-on packages are installed in the 4.0.2 version.  Also included are slightly newer 4.1.0 and R 4.2.2 and slightly modified Microsoft R Open 4.0.2, plus older saved versions.  See [[https://www.analyttica.com/microsoft-r-or-open-source-r-which-suits-you-the-best/|R vs. Microsoft R]].+The "R" statistical/programming package is installed on the clusters.  The greatest number of add-on packages are installed in the 4.0.2 version.  Also included are older saved versions, newer 4.1.0 and R 4.2.2 and slightly modified Microsoft R Open 4.0.2 [[https://web.archive.org/web/20200808203121/https://analyttica.com/microsoft-r-or-open-source-r-which-suits-you-the-best/]].
  
 <code> <code>
 module load gcc/9.3.1 mkl/19.0.5 R/4.2.2 module load gcc/9.3.1 mkl/19.0.5 R/4.2.2
 </code> </code>
-"gcc" module may be omitted unless you are adding R packages (see below).  Substitute R/4.1.0 or MR/4.0.2 as desired for those versions.  You can also add rstudio if you want the gui.  This is most easily run through a portal.+"gcc" module may be omitted unless you are adding R packages (see below).  Substitute R/4.1.0 or MR/4.0.2 as desired for those versions.  You can also add rstudio if you want the gui.  This is best run through a portal (via interactive-apps Desktop or Rstudio GUI).
 <code> <code>
 module load gcc/9.3.1 mkl/19.0.5 R/4.2.2 rstudio module load gcc/9.3.1 mkl/19.0.5 R/4.2.2 rstudio
Line 13: Line 13:
 If you need a new R package, you can ask hpc-support to add it to the central installation, or you can add your own packages as demonstrated below for the package "broman" R is not as prone to conflicts as Python, so most packages can be added to the central installation without issues.  Another way to create a custom installation is using [[python|conda]], which would be better if you see conflicts with standard ''R''. It will, however, install many thousands of files in your home. If you need a new R package, you can ask hpc-support to add it to the central installation, or you can add your own packages as demonstrated below for the package "broman" R is not as prone to conflicts as Python, so most packages can be added to the central installation without issues.  Another way to create a custom installation is using [[python|conda]], which would be better if you see conflicts with standard ''R''. It will, however, install many thousands of files in your home.
  
-For this simple installation, before starting, create files ~/.Rprofile and ~/.Renviron as shown, plus other variables you may want to set.  See [[https://rstats.wtf/r-startup.html|rstats.wtf]].   Some redundant text output has been omitted.+For this simple installation, before starting, create files ~/.Rprofile and ~/.Renviron as shown, plus  the R library directories (changing full version 4.2.2 to 4.2 in this example) and any of the other R environment variables you may want to set [[https://rstats.wtf/r-startup.html|rstats.wtf]].   
  
-The files ~/.Rprofile and ~/.Renviron should look like this. Also create ``mkdir -p`` the R library directories as shown with the major version of R that you are using (changing 4.2.2 to 4.2 in this case). 
 <code> <code>
 pinnacle-l4:feynman:$ cat .Rprofile pinnacle-l4:feynman:$ cat .Rprofile
Line 26: Line 25:
 </code> </code>
  
-With those files in place you can install any R package yourself.  Your packages will be installed into  +With those files in place you can install any R package yourself. Some redundant text output below has been omitted
-a directory in your /home directory In this example '/scrfs/storage/feynman/home/R/x86_64-pc-linux-gnu/4.2':+
  
 <code> <code>
r.1670429301.txt.gz · Last modified: 2022/12/07 16:08 by root