1. 下载源码包

    • 在http://cran.r-project.org/mirrors.html,选择一个国内镜像下载需要的版本,比如:http://mirror.lzu.edu.cn/CRAN/src/base/R-3/,这儿我下载了R-3.1.3版的源码,大约20多M,很快就下载完成。
  2. 解压源码
    • 压缩包我放在/user/local目录下,进入此目录后运行命令:
    • tar xzf R-3.1.3.tar.gz
    • 解压到当前目录
  3. 检查编译环境及编译
    • 进入目录
    • cd R-3.1.3
    • ./configure
    • checking for g++... no
      checking for c++... no

      configure: error: No F77 compiler found
      ...会有一大堆不满足的条件
    • 安装对应的依赖即可
      yum install gcc-c++ (如果没有安装c和c++的编译器)
      yum install readline-devel
      yum install libXt-devel
      yum install gcc-gfortran (解决configure: error: No F77 compiler found 错误)
    • ./configure  --enable-R-shlib --prefix=/usr/R-3.1.3
      make
      make install
    • 将/usr/local/R-3.1.3/bin加入用户或系统环境变量的path里边:
         比如:vim /etc/profile
         增加这一行:export PATH=/usr/R-3.1.3/bin:$PATH
         source /etc/profile
  4. 测试
>R
即可看到如下信息:
简单测试
ok!
R version 3.1.3 (2015-03-09) -- "Smooth Sidewalk"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-unknown-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R. > x<-c(1,2,3)
> 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 freedom
Multiple R-squared: 0.7575, Adjusted R-squared: 0.5151
F-statistic: 3.124 on 1 and 1 DF, p-value: 0.3278 > proc.time()
user system elapsed
0.300 0.024 97.456
>
 

R 在linux redhat 6.5的编译安装过程的更多相关文章

  1. Linux环境PostgreSQL源码编译安装

    Linux环境PostgreSQL源码编译安装 Linux版本: Red Hat 6.4 PostgreSQL版本: postgresql-9.3.2.tar.gz 数据存放目录: /var/post ...

  2. LAMP环境源码编译安装过程

    LAMP环境源码编译安装过程 一.Apache的安装 1.1.apache软件包及依赖包准备 httpd-2.4.29.tar.bz2       apr-1.6.3.tar.gz      apr- ...

  3. 转-httpd 2.4.4 + mysql-5.5.28 + php-5.4.13编译安装过程

    一.编译安装apache 1.解决依赖关系 httpd-2.4.4需要较新版本的apr和apr-util,因此需要事先对其进行升级.升级方式有两种,一种是通过源代码编译安装,一种是直接升级rpm包.这 ...

  4. Mapnik 编译安装过程

    首先总结一下,Linux(windows上没有测试过)上Mapnik的编译与测试就是一部心酸血泪史呀,如果您没有做好思想准备,那就出门左转,看点有意思的去吧,编译这个太煎熬了. 安装PostgreSQ ...

  5. SuSe Linux Enterprise Server 10 With Sp2 安装过程图解

    SuSe Linux Enterprise Server 10 With Sp2 安装过程图解 650) this.width=650;" style="border-right- ...

  6. Linux Red Hat 8.0虚拟机安装过程

    Linux Red Hat 8.0虚拟机安装过程 一.安装虚拟机所需要的工具: 1.VMware Workstation Pro 2.Red Hat 8.0 虚拟机镜像 3.还有一个就是VMware的 ...

  7. Linux下用Intel编译器编译安装NetCDF-Fortan库(4.2以后版本)

    本来这个问题真的没必要写的,可是真的困扰我太久%>_<%,决定还是记录一下. 首先,最权威清晰的安装文档还是官方的: Building the NetCDF-4.2 and later F ...

  8. Linux下通过源码编译安装程序

    本文简单的记录了下,在linux下如何通过源码安装程序,以及相关的知识.(大神勿喷^_^) 一.程序的组成部分 Linux下程序大都是由以下几部分组成: 二进制文件:也就是可以运行的程序文件 库文件: ...

  9. Linux APP源码级编译安装

    首先需要了解下tar包. 以下文章作出解释了: http://www.cnblogs.com/laipDIDI/articles/2214270.html http://baike.baidu.com ...

随机推荐

  1. 用PowerMock mock final类

    mock final类相对简单,直接贴代码 被测方法: public class FinalEmployeeService { public void insertEmployee(Employee ...

  2. C#文件流读写文件的简单winform实现

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  3. 改变系统自带UITableViewCell的imageView的大小

    CGSize itemSize = CGSizeMake(, ); UIGraphicsBeginImageContextWithOptions(itemSize, NO,0.0); CGRect i ...

  4. CSS之过渡简单应用—日落西山

    代码: <!DOCTYPE html><html><head> <title>日落西山</title> <meta charset=& ...

  5. 查看数据库中没有进行comment的字段

    为落实数据库规范,既每个表字段都需要有comment注释,所以需要过滤生产表中没有comment的字段,搜索出还不错的过滤语句 show full columns from table where C ...

  6. c++虚函数和内联构造函数

    创建一个含有虚函数的对象时, 编译器会实现 "初始化其VPTR以指向相应的VTABLE" 这个操作 ,而实现这个操作是通过 "插入隐藏代码至构造函数中" 故此时 ...

  7. android基础(六)android的消息处理机制

    Android中的消息处理机制由四个部分组成:Message.Handler.MessageQueue和Looper,并且MessageQueue封装在Looper中,我们一般不直接与MQ打交道. 一 ...

  8. 用Unity写一个12306验证器的恶搞图生成软件

    前言 前一阵子是买火车票的高峰期,然后12306的验证码就遭到各种吐槽.其实大部分验证码没有那么难,大家只是因为买不到票 发泄一下不满的情绪.于是各种恶搞的图就出现了,比如找二次元里人物的矮子,找好男 ...

  9. 【转】Thread.isBackground

    C#中,Thread类有一个IsBackground 的属性.MSDN上对它的解释是:获取或设置一个值,该值指示某个线程是否为后台线程.个人感觉这样的解释等于没有解释. .Net中的线程,可以分为后台 ...

  10. C#联机获取公网IP

    C#获取IP的方式有很多种,这里通过http://www.ipip.net/这个稳定的在线IP库的来获取公网IP. string tempip = "0.0.0.0"; WebRe ...