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.