Installing R from source
This commit is contained in:
parent
296ea962f4
commit
b14aa6bdee
|
@ -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]]
|
||||
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue