1.安装R
sudo apt-get install r-base
2.安装RStudio
wget https://download1.rstudio.org/rstudio-1.0.136-amd64.deb sudo apt-get install gdebi-core sudo apt-get install libapparmor1 sudo gdebi rstudio-1.0.136-amd64.deb
which rstudio
rstudio #打开RStudio
3.安装RStudio Server
sudo apt-get install gdebi-core wget https://download2.rstudio.org/rstudio-server-1.0.136-amd64.deb sudo gdebi rstudio-server-1.0.136-amd64.deb
rstudio-server start
在网页中输入 www.服务器IP地址:8787/ (远程服务器) 或http://localhost:8787/ (本地) 登陆之后效果如下:,就可以用了
默认登录账户密码为系统登录的账户与密码
4.在Rstudio里安装ggplot2
install.packages('plyr') install.packages('digest') install.packages('gtable') install.packages('reshape2') install.packages('scales') install.packages('proto') install.packages('ggplot2')