Installing R-4.2.0
Procedure
- Download the R language source package.
cd /path/to/WGCNA wget https://cran.r-project.org/src/base/R-4/R-4.2.0.tar.gz
- Decompress the installation package and go to the directory generated after the decompression.
tar xvf R-4.2.0.tar.gz cd R-4.2.0
- Install the dependencies.
yum install libXt-devel libX11-devel readline-devel
- Perform the compilation.
./configure --prefix=/path/to/WGCNA/R_install make make install
- Load the environment variables.
export PATH=/path/to/WGCNA/R_install/bin:$PATH export LB_LIBRARY_PATH=/path/to/WGCNA/R_install/lib/R/lib:$ LB_LIBRARY_PATH
- (Optional) If the network speed is slow, add a mirrored source of the R language.
- Create an ~/.Rprofile file.
vi ~/.Rprofile
- Press i to enter the insert mode and add the following content:
options("repos"= c(CRAN="http://mirrors.tuna.tsinghua.edu.cn/CRAN/")) options(BioC_mirror="http://mirrors.tuna.tsinghua.edu.cn/bioconductor/") - Press Esc, type :wq!, and press Enter to save the file and exit.
- Create an ~/.Rprofile file.
Parent topic: Configuring the Compilation Environment