R
This is the landing page for R which contains guides, tutorials and other contributed resources for using R on the UFS HPC
UFS HPC usage example
R can be loaded as an environmental module as follows:
-
Open a Terminal
-
Load the R module:
$ module load R
-
Note that the command above will load the latest available version of R. To load a specific version of R, type the command as above and then tab complete (press tab multiple times) to see the versions available. Then load the chosen version as follows:
$ module load R/3.6.1
-
You may now invoke the R interpreter:
$ R
or for an R script:
$ Rscript <script>
Installing packages in R
Packages are installed into a user's home directory. However, it is important to only use these packages with the R version they were installed with.
To install packages from the R interpreter, issue these commands according to the source of the desired package:
-
To install packages from Bioconductor:
$ BiocManager::install("package name")
-
To install packages from CRAN:
$ install.packages("package name")
-
To install packages from GitHub:
$ remotes::install_github('username/packagename')
Performance Notes
Recommended resources per session
- 1 Node
- The recommended resources required by R will depend each use case, however, here are some helpful hints:
- If your workload is calculation heavy - use more cores
- If you work with large datasets - use more memory
Benchmarks
No benchmarks are available.
UFS HPC Community Guides and Tutorials
Official site and documentation
Licensing Information
- RStudio is free to use under the GNU General Public License, version 2
Primary Citation
- R Core Team (2020). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/
- Please remember to check (and cite) the citations for any packages used with R
- To check for the citation of a package, issue and run the following command within R:
$ citation(*package_name*)
- To check for the citation of a package, issue and run the following command within R:
External Guides and Resources
- If you are completely new to R, consult this free online textbook: Hands-on programming with R by Grolemund (2014)
- If you are familiar with the basics of R, try this free online book: R for Datascience by Wickham and Grolemund (2016)
- If you know of a guide/tutorial that you have found useful, please help us share it by contacting the HPC staff at hpc@ufs.ac.za