Ubuntu 16.04 LTS 安装R及RStudio Server
1.R的安装
1.1首先添加镜像源
# Ctrl+Alt+T打开终端 $ sudo gedit /etc/apt/sources.list # 加入新镜像源 回车之后会自动跳出一个文本框,然后在相似的地方输入 deb http://cran.rstudio.com/bin/linux/ubuntu trusty/
加载镜像源还可以使用以下方法:
deb https://<my.favorite.cran.mirror>/bin/linux/ubuntu xenial/ deb https://<my.favorite.cran.mirror>/bin/linux/ubuntu wily/ deb https://<my.favorite.cran.mirror>/bin/linux/ubuntu trusty/ deb https://<my.favorite.cran.mirror>/bin/linux/ubuntu precise/ or in your /etc/apt/sources.list file, replacing by the actual URL of your favorite CRAN mirror. See https://cran.r-project.org/mirrors.html for the list of CRAN mirrors.
修改后保存并退出(File→quit)
1.2 运行命令下载公钥
# 下载公钥$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 51716619E084DAB9 # 然后更新一下 $ sudo apt-get update
1.3 安装R
$ sudo apt-get install r-base
然后验证是否安装成功:在终端输入R,出现R的信息则安装成功。
1.4 其他
一些可用的包存储在CRAN的Ubuntu仓库中,包括:
r-cran-boot
r-cran-class
r-cran-cluster
r-cran-codetools
r-cran-foreign
r-cran-kernsmooth
r-cran-lattice
r-cran-mass
r-cran-matrix
r-cran-mgcv
r-cran-nlme
r-cran-nnet
r-cran-rpart
r-cran-spatial
r-cran-survival
r-cran-rodbc
要更新以上的包,可以使用下面的命令(替换掉foo):
$ sudo apt-get build-dep r-cran-foo
R包的安装:
# 安装包 > install.packages() # 更新包 > update.packages(lib.loc = "/usr/local/lib/R/site-library")
2. 安装Rstudio
2.1 安装
首先,去下载对应自己系统的安装文件: http://www.rstudio.com/products/rstudio/download/,然后执行一下步骤。
$ sudo apt-get install gdebi-core $ wget https://download2.rstudio.org/rstudio-server-0.99.902-amd64.deb $ sudo gdebi rstudio-server--amd64.deb
2.2 启动Rstudio server
在浏览器中输入地址和端口,如:
在windows下的浏览器中,192.168.43.129为安装rstudio的地址:http://192.168.43.129:8787 在Ubuntu下:http://localhost:8787
然后会出现要求输入用户名和密码,这跟登录Ubuntu时候使用的用户和密码相同
登录后是这样的:
2.3在Rstudio server里安装ggplot2
安装ggplot2包之前需要先安装其它的依赖包:' plyr ' , ' digest ' , ' gtable ' , ' reshape2 ' , ' scales ' , ' proto ' , 在Rstudio的命令窗口分别执行以下命令:
install.packages('plyr')
install.packages('digest')
install.packages('gtable')
install.packages('reshape2')
install.packages('scales')
install.packages('proto')
然后,安装ggplot2包:
install.packages('ggplot2')
参考:
https://www.rstudio.com/products/rstudio/download-server/
https://cran.r-project.org/bin/linux/ubuntu/
https://bookdown.org/yihui/r-ninja/setup.html#r
转载请注明地址:
http://www.cnblogs.com/homewch/p/5658699.html
Ubuntu 16.04 LTS 安装R及RStudio Server的更多相关文章
- Ubuntu 16.04 LTS 安装 Nginx/PHP 5.6/MySQL 5.7 (LNMP) 与Laravel
Ubuntu 16.04 LTS 安装 Nginx/PHP 5.6/MySQL 5.7 (LNMP) 与Laravel 1.MySQL安装[安装 MariaDB]MariaDB是MySQL的一个分支首 ...
- Ubuntu 16.04 LTS安装 TeamViewer
Ubuntu 16.04 LTS安装 TeamViewer 64位Ubuntu 16.04系统需要添加32位架构支持,命令如下. sudo dpkg --add-architecture i3 ...
- Ubuntu 16.04 LTS 安装 miniconda
Ubuntu 16.04 LTS 安装 miniconda 下载 miniocnda 的 bash 文件下载链接 https://conda.io/miniconda.html ,我选择的是 64-b ...
- Ubuntu 16.04 LTS安装好需要设置的15件事(喜欢新版本)
看到这篇文章说明你已经从老版本升级到 Ubuntu 16.04 或进行了全新安装,在安装好 Ubuntu 16.04 LTS 之后建议大家先做如下 15 件事.无论你是刚加入 Ubuntu 行列的新用 ...
- Ubuntu 16.04 LTS安装好之后需要做的15件事
看到这篇文章说明你已经从老版本升级到 Ubuntu 16.04 或进行了全新安装,在安装好 Ubuntu 16.04 LTS 之后建议大家先做如下 15 件事.无论你是刚加入 Ubuntu 行列的新用 ...
- Ubuntu 16.04 LTS 安装libvips出现”Package vips was not found in the pkg-config search path”
使用libvips来操作图像,libvips的部署参考一个Node.js工程:https://github.com/lovell/sharp 在MAC下安装很顺利,到Linux环境下(Ubuntu 1 ...
- Ubuntu 16.04 LTS安装Docker并使用加速器
参考优酷:http://v.youku.com/v_show/id_XMTkxOTYwODcxNg==.html?spm=a2h0k.8191407.0.0&from=s1.8-1-1.2 首 ...
- ubuntu 16.04 LTS安装jenkins服务器
官方网站:https://jenkins.io/ 这里我们的系统是Ubuntu 16.04,所以选择Ubuntu的版本,另外,为什么选择2.60.3,而不是新的2.77?因为2.60.3是LTS版本, ...
- Ubuntu 18.04上安装R及Rstudio
安装R引用自:https://www.howtoing.com/how-to-install-r-on-ubuntu-18-04 安装Rstudio引用自:https://www.rstudio.co ...
随机推荐
- centos7 php7 httpd
安装php之前,要先安装几个 1.下载php源码:http://cn2.php.net/distributions/php-7.0.6.tar.gz. 2.然后使用命令:tar -zxvf php-7 ...
- chaper3_exerise_Uva10340_子字串
#include<iostream> #include<string> #include<cstring> using namespace std; int Fin ...
- AFNetworking请求设置请求头
NSString *url = @"INPUT URL HERE"; AFHTTPRequestOperationManager *manager = [AFHTTPRequest ...
- 使用Memcached Session Manager扩展Session管理
>>Tomcat的session管理 在请求过程中首先要解析请求中的sessionId信息,然后将sessionId存储到request的参数列表中. 然后再从request获取sessi ...
- 玩转SSRS第十篇---自定义代码
提到SSRS 那么就不得不提一下自定义代码的功能,通过自定义代码,有时候可以解决一些比较复杂的问题,比如将让指定的数据行应用指定的属性值.此篇将演示如何通过简单结构的自定义代码进行报表样式的基本设计. ...
- B树算法与实现 (C语言实现)
B树的定义 假设B树的度为t(t>=2),则B树满足如下要求:(参考算法导论) (1) 每个非根节点至少包含t-1个关键字,t个指向子节点的指针:至多包含2t-1个关键字,2t个指向子女的指针 ...
- golang channel buffer
package mainimport ( "fmt" "time")func main() { // Case-1: no buffer //chanMessa ...
- PHP5中使用PDO连接数据库的方法
PDO(PHP Data Object) 是PHP 中加入的东西,是PHP 5新加入的一个重大功能,因为在PHP 5以前的php4/php3都是一堆的数据库扩展来跟各个数据库的连接和处理,php_my ...
- Codeforces Round #229 (Div. 2) C. Inna and Candy Boxes 树状数组s
C. Inna and Candy Boxes Inna loves sweets very much. She has n closed present boxes lines up in a ...
- 【项目经验】 Html Select 遇上 Easyui
一.背景: 当我在做课表选择触发事件的时候,我发现了一个问题,就是我们直接用的easyui-combobox里面的的绑定事件(onchange)貌似触发不了,这是为什么呢? 二.结论及方法 .原始方法 ...