# R 4.2.2 {{< admonition warning "Configuration required" true >}} See the relevant section below to configure this software before use. {{< /admonition >}} ## R-4.2.2 See the latest [news here](https://cran.r-project.org/doc/manuals/r-release/NEWS.html). R is a free software environment for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platforms, Windows and MacOS. [Link to R FAQ from the r-project](https://cran.r-project.org/doc/FAQ/R-FAQ.html) ------------------------------------------------------------------------------- ## To activate this version of R Edit your `$PATH` to include `/local/cluster/R-4.2.2/bin`. Make a new directory for your `$R_LIBS` and set your `$R_LIBS` to that directory. Unset your `$R_LIBS_USER`. For more information, [see here.](../../../tips/posts/using-system-r-with-user-installed-packages/) ## To install new packages for R-4.2.2 You must `source` one of these files to install new packages for your R-4.2.2. Check out a node with `qrsh` and then choose the correct file to `source`: ```console source /local/cluster/R-4.2.2/activate_R_install.csh source /local/cluster/R-4.2.2/activate_R_install.sh ``` Use the .csh file for `tcsh` shell and the .sh file for `bash`. Then, to test your environment: ```console R install.packages('remotes') ``` Assuming the [remotes](https://github.com/r-lib/remotes) package installs correctly, you should be good to go. I recommend installing other packages using `remotes::install_cran()` (or the other associated `install_*` commands. You should not need to source this file all of the time, and after the relevant packages have been installed, you should not need to source the file to run the R-4.2.2 version. ## Location and version ```console $ lsd /local/cluster/R-4.2.2/bin  R  Rscript $ /local/cluster/R-4.2.2/bin/R --version R version 4.2.2 (2022-10-31) -- "Innocent and Trusting" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under the terms of the GNU General Public License versions 2 or 3. For more information about these matters see https://www.gnu.org/licenses/. ``` software ref: research ref: Run `citation()` from an interactive R session