R 在linux redhat 6.5的编译安装过程
- 下载源码包
- 在http://cran.r-project.org/mirrors.html,选择一个国内镜像下载需要的版本,比如:http://mirror.lzu.edu.cn/CRAN/src/base/R-3/,这儿我下载了R-3.1.3版的源码,大约20多M,很快就下载完成。
- 解压源码
- 压缩包我放在/user/local目录下,进入此目录后运行命令:
- tar xzf R-3.1.3.tar.gz
- 解压到当前目录
- 检查编译环境及编译
- 进入目录
- 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-develyum install libXt-develyum install gcc-gfortran (解决configure: error: No F77 compiler found 错误)- ./configure --enable-R-shlib --prefix=/usr/R-3.1.3makemake install
- 将/usr/local/R-3.1.3/bin加入用户或系统环境变量的path里边:比如:vim /etc/profile增加这一行:export PATH=/usr/R-3.1.3/bin:$PATHsource /etc/profile
- 测试
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的编译安装过程的更多相关文章
- Linux环境PostgreSQL源码编译安装
Linux环境PostgreSQL源码编译安装 Linux版本: Red Hat 6.4 PostgreSQL版本: postgresql-9.3.2.tar.gz 数据存放目录: /var/post ...
- LAMP环境源码编译安装过程
LAMP环境源码编译安装过程 一.Apache的安装 1.1.apache软件包及依赖包准备 httpd-2.4.29.tar.bz2 apr-1.6.3.tar.gz apr- ...
- 转-httpd 2.4.4 + mysql-5.5.28 + php-5.4.13编译安装过程
一.编译安装apache 1.解决依赖关系 httpd-2.4.4需要较新版本的apr和apr-util,因此需要事先对其进行升级.升级方式有两种,一种是通过源代码编译安装,一种是直接升级rpm包.这 ...
- Mapnik 编译安装过程
首先总结一下,Linux(windows上没有测试过)上Mapnik的编译与测试就是一部心酸血泪史呀,如果您没有做好思想准备,那就出门左转,看点有意思的去吧,编译这个太煎熬了. 安装PostgreSQ ...
- SuSe Linux Enterprise Server 10 With Sp2 安装过程图解
SuSe Linux Enterprise Server 10 With Sp2 安装过程图解 650) this.width=650;" style="border-right- ...
- Linux Red Hat 8.0虚拟机安装过程
Linux Red Hat 8.0虚拟机安装过程 一.安装虚拟机所需要的工具: 1.VMware Workstation Pro 2.Red Hat 8.0 虚拟机镜像 3.还有一个就是VMware的 ...
- Linux下用Intel编译器编译安装NetCDF-Fortan库(4.2以后版本)
本来这个问题真的没必要写的,可是真的困扰我太久%>_<%,决定还是记录一下. 首先,最权威清晰的安装文档还是官方的: Building the NetCDF-4.2 and later F ...
- Linux下通过源码编译安装程序
本文简单的记录了下,在linux下如何通过源码安装程序,以及相关的知识.(大神勿喷^_^) 一.程序的组成部分 Linux下程序大都是由以下几部分组成: 二进制文件:也就是可以运行的程序文件 库文件: ...
- Linux APP源码级编译安装
首先需要了解下tar包. 以下文章作出解释了: http://www.cnblogs.com/laipDIDI/articles/2214270.html http://baike.baidu.com ...
随机推荐
- [转]ZendFramework数据库操作总结
Zend_Db数据库知识 例子: Model文件: $this->fetchAll("is_jian=1","id DESC",0,2)->toAr ...
- java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException
问题描述: 严重: IOException while loading persisted sessions: java.io.WriteAbortedException: writing abort ...
- android studio 换护眼的颜色步骤
设置--->Editor-->General-->Default Text-->Background护眼色是#D2E3C7
- C++多线程1
一个多线程的实例 #include "stdafx.h" #include <windows.h> DWORD __stdcall Func(LPVOID pm) { ...
- sysctl.conf网络内核参数说明(转)
下面是我的理解,可能有误,仅供参考. 要调优,三次/四次握手必须烂熟于心. client server(SYN_SENT) —> (SYN_RECV ...
- mysql 操作杂记
SHOW VARIABLES LIKE 'character%'; SET character_set_client = utf8; SET character_set_connection = ut ...
- WC项目要求
#include "stdio.h" #include "string.h" #include "stdlib.h" int charcal ...
- android:installLocation 解析
决定了apk安装位置 有三个选项:1.auto 2.internalOnly 3.preferExternal http://www.cnblogs.com/Lefter/archive/2012/0 ...
- centos7安装nginx
一般我们都需要先装pcre, zlib,前者为了重写rewrite,后者为了gzip压缩. 一:安装 pcre 1.下载地址:百度云盘 http://pan.baidu.com/s/1dFusO3v ...
- C语言程序设计第5堂作业
一.本次课学习主要内容及知识结构点: 二.实验内容:(60分) 1. 求奇数和.输入一批正整数(以零或负数为结束标志),求其中的奇数和.试编写相应程序. 2. 展开式求和.输入一个实数 x,计算并输出 ...