Recently looking at data statistics and analysis, think of the R language, and then started in their own CentOS environment for installation and configuration. The steps are as follows:
1. Go to the R official website to download the installation package.
2. Unzip the package: Tar xvzf r-3.2.2.tar.gz
3. Compile:./configure--prefix=/usr/local/rscript (--prefix content customization, this is the installation directory of R)
Note The following error may occur during this process:
--with-readline=yes (default) and Headers/libs is not available
Please perform a yum install Readline-devel Libxt-devel
cannot compile a simple Fortran program
Please perform the Yum install Gcc-gfortran
4. Install: Make && do install
Configure the environment for R to run:
1.vim/etc/profile
2. Add at the end: Export path=/usr/local/rscript/bin: $PATH
3. In terminal execution: Source/etc/profile
4. Enter r and press ENTER to enter the interactive mode of R
Installation and configuration of the R language in the CentOS environment