From b14aa6bdee92debce8f7c47ecdd270d847e5ca87 Mon Sep 17 00:00:00 2001 From: Jose Date: Thu, 27 Oct 2022 16:29:58 -0300 Subject: [PATCH] Installing R from source --- README.org | 1 + doc/install_Rsource.org | 53 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100755 doc/install_Rsource.org diff --git a/README.org b/README.org index d09e61e..c7c328a 100755 --- a/README.org +++ b/README.org @@ -6,6 +6,7 @@ data using the R programming environment ** First steps in R * [[./script/help_r.org][Asking for help to use R]] + * [[./doc/install_Rsource.org][Installing R from source]] * [[./script/integerq_modulo.R][Integer quocient and modulo]] * [[./script/non_stand_eval.R][Non-standard evaluation in R]] diff --git a/doc/install_Rsource.org b/doc/install_Rsource.org new file mode 100755 index 0000000..070c366 --- /dev/null +++ b/doc/install_Rsource.org @@ -0,0 +1,53 @@ +#+title: How to install R from source in GNU linux distributions +#+date: 2022-05-28 + +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 + +#+begin_example sh + wget https://cran.r-project.org/src/base/R-4/R-4.2.0.tar.gz +#+end_example + +Then, use "tar" to extract the source and build it. Suppose that you are installing +R 4.2: + +#+begin_example sh + tar -xf R-4.2.0.tar.gz +#+end_example + +Go to a directory where you will install R. The path shouldn't contain spaces. + +#+begin_example sh + ./configure + make +#+end_example + +#+begin_example sh + make check +#+end_example + +If you want to install all the R tree (binaries, manuals, libraries...): + +#+begin_example sh + make install +#+end_example + +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: + +#+begin_example R + R CMD INSTALL -l /path/to/library packagename +#+end_example + +You may also be interested in looking at this information: + +- https://cran.r-project.org/bin/linux/redhat/ +- https://cran.r-project.org/sources.html +- The R manual describes how to install R from source in: + - R-admin > Obtaining R > Getting and unpacking the sources + - R-admin > Installing R under Unix-alikes