添加新的源
sudo gedit /etc/apt/sources.list
保存(trusty为Ubuntu的版本号)ubuntu14
deb http://cran.stat.ucla.edu/bin/linux/ubuntu/ trusty/
2.2在命令行执行:
sudo apt-get update (更新源)
sudo apt-get install r-base r-recommended(安装)
or
sudo apt-get upgrade(更新)
or
sudo apt-get install r-base
sudo apt-get install r-base-dev 从源码安装 R
可能会遇到的问题:
Thefollowing signatures couldn't be verified because the public key isnot available: NO_PUBKEY 51716619E084DAB9
解决方法如下:
获取key
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
更新apt-key
gpg -a --export E084DAB9 | sudo apt-key add -
安装Rstudio
去下载对应自己系统的安装文件: http://www.rstudio.com/products/rstudio/download/
sudo apt-get install gdebi-core
sudo apt-get install libapparmor1 # Required only for Ubuntu, not Debian
sudo gdebi rstudio-0.99.903-i386.deb # 下载的Rstudio的deb安装包
终端输入rstudio
測試
在Rstudio里安装ggplot2
install.packages('plyr')
install.packages('digest')
install.packages('gtable')
install.packages('reshape2')
install.packages('scales')
install.packages('proto')
install.packages('ggplot2')
sudo gedit /etc/apt/sources.list
保存(trusty为Ubuntu的版本号)ubuntu14
deb http://cran.stat.ucla.edu/bin/linux/ubuntu/ trusty/
2.2在命令行执行:
sudo apt-get update (更新源)
sudo apt-get install r-base r-recommended(安装)
or
sudo apt-get upgrade(更新)
or
sudo apt-get install r-base
sudo apt-get install r-base-dev 从源码安装 R
可能会遇到的问题:
Thefollowing signatures couldn't be verified because the public key isnot available: NO_PUBKEY 51716619E084DAB9
解决方法如下:
获取key
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
更新apt-key
gpg -a --export E084DAB9 | sudo apt-key add -
安装Rstudio
去下载对应自己系统的安装文件: http://www.rstudio.com/products/rstudio/download/
sudo apt-get install gdebi-core
sudo apt-get install libapparmor1 # Required only for Ubuntu, not Debian
sudo gdebi rstudio-0.99.903-i386.deb # 下载的Rstudio的deb安装包
终端输入rstudio
測試
在Rstudio里安装ggplot2
install.packages('plyr')
install.packages('digest')
install.packages('gtable')
install.packages('reshape2')
install.packages('scales')
install.packages('proto')
install.packages('ggplot2')