intro_r/doc/install_Rsource.org

1.4 KiB
Executable File

How to install R from source in GNU linux distributions

You may follow the manual on the topic "installing R under Unix-alike".

You can download the source from:

https://cran.r-project.org/sources.html

  wget https://cran.r-project.org/src/base/R-4/R-4.2.0.tar.gz

Then, use "tar" to extract the source and build it. Suppose that you are installing R 4.2:

  tar -xf R-4.2.0.tar.gz

Go to a directory where you will install R. The path shouldn't contain spaces.

  ./configure
  make
  make check

If you want to install all the R tree (binaries, manuals, libraries…):

  make install

To install packages in R, you can use the function "install.packages()" with the name of the file ('…tar.gz') to be installed and the argument "repos" set as "NULL"

You can also install the packages from a shell:

  R CMD INSTALL -l /path/to/library packagename

You may also be interested in looking at this information: