linux中安装R

linux版本

[root@node3 ~]# uname -a
Linux node3 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@node3 ~]# cat /etc/issue
Red Hat Enterprise Linux Server release 6.2 (Santiago)
Kernel \r on an \m

安装步骤

1 下载 R安装包  http://cran.r-project.org/index.html
解压

tar zxvf  R-3.0.3.tar.gz  

2 执行命令:保证R安装完成后方向键可以用
	yum install readline-devel
	yum install libXt-devel

3 切换到R文件夹
 
  ./configure --prefix=/home/work/R --enable-R-shlib   

   安装在工作目录/home/work/R下,enable-R-shlib保证lib下动态库共享,若没有这个设置,在使用有些包时会报错

4 make

make

5 make install

make install

6 link到bin目录下    
cd /bin
    sudo ln -sv /home/work/R/bin/R

7 make clean 删除安装时产生的临时文件

make clean
至此,安装成功
安装成功后,键入R即可进入R编辑环境
[root@node3 ~]# R


R version 3.0.3 (2014-03-06) -- "Warm Puppy"
Copyright (C) 2014 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.


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章