R in Linux redhat 6.5 compilation and installation process

Source: Internet
Author: User

  1. Download the source Package
    • In http://cran.r-project.org/mirrors.html, select a domestic image to download the required version, for example: http://mirror.lzu.edu.cn/CRAN/src/base/R-3/, Here I downloaded the R-3.1.3 version of the source code, about 20 m, the download will be completed soon.
  2. Decompression source
    • Compress package I put it in the/user/local directory and run the command after entering this directory:
    • Tar xzf r-3.1.3.tar.gz
    • Extract to current directory
  3. Checking the compilation environment and compiling
    • Go to Catalog
    • CD R-3.1.3
    • ./configure
    • checking for g++... nochecking for c++... no
      Configure:error:No F77 Compiler found
      ... There will be a whole bunch of unsatisfied conditions.
    • installation of the corresponding dependencies can be
      Yum Install gcc-c++ (if the C and C + + compilers are not installed) Yum install Readline-develyum install Libxt-develyum install Gcc-gfortran ( Resolve configure:error:No F77 compiler found error)
    • ./configure--enable-r-shlib--prefix=/usr/r-3.1.3 Make Make Install
    • Add/usr/local/r-3.1.3/bin to the PATH inside the user or system environment variable: For example: Vim/etc/profile Add this line: Export path=/usr/r-3.1.3/bin: $PATH source/etc/ Profile
  4. Test
>r can see the following information: Simple test ok!

R version 3.1.3 (2015-03-09)--"Smooth sidewalk"Copyright (C) the R Foundation forStatistical Computingplatform:x86_64-unknown-linux-gnu (64-bit)Software and comes with absolutely NO WARRANTY.You is welcome to redistribute it under certain conditions. Type ' license () ' or ' licence () ' for distribution details. Natural language Support but running in an 中文版 Localer is a collaborative project with many contributors. The Type ' contributors () ' for  more information and ' citation () ' is on what cite R or R packages in publications. Type ' demo () ' For some demos, ' Help () ' for on-line help,  or ' help.start () ' for the HTML browser interface to help. Type ' Q () ' To quit R.> x<-c (All-in-A-Z) > Y<-c (102,299,301) > Model<-lm (y~x) > Summary (model) call : LM (formula = y ~ x)  residuals:1 2 3  -32.5 65.0-32.5  coefficients:estimate Std. Error t value Pr (>|t|) (Intercept) 35.00 121.60 0.288 0.822  x 99.50 56.29 1.768 0.328  residual standard error:79.61 on 1  degrees of Freedommultiple r-squared:0.7575, adjusted r-squared:0.5151  f-statistic:3.124 on 1 and 1 DF, p-value:0.3278& Gt Proc.time ()  user system elapsed 0.300 0.024 97.456;         

R in Linux redhat 6.5 compilation and installation process

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.