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 ...
随机推荐
- cmd for备忘
=============参数 /d (参数只能显示当前目录下的目录名字)=================== rem 显示d:\work\目录下与*.txt相匹配的文件(如果报错就%i-> ...
- 数独挑战(codevs 2924)
2924 数独挑战 时间限制: 1 s 空间限制: 1000 KB 题目等级 : 钻石 Diamond 题解 查看运行结果 题目描述 Description “芬兰数学家因卡拉,花费3 ...
- Application.ProcessMessages用法
参考:http://cqujsjcyj.iteye.com/blog/380926 我想你可能还有点模糊.举个例子容易明白:假如你的窗体上有两个按钮,一个“计算”,一个“停止”, 如果你的计算是密集运 ...
- Eclipse 快捷键 转换为Netbeans 快捷键
一直使用netbeans IDE开发,习惯了netbeans的快捷键,最近要开发个app就选择了H5. 接着使用了HBuilder (基于Eclipse开发) 总体来讲这个IDE还可以,不管是代码提示 ...
- 第一部分:使用iReport制作报表的详细过程(Windows环境下)
提示:在有些板块,文中的图片看不到,建议到我的blog浏览文章:http://blog.csdn.net/jemlee2002/文章将会涉及3个方面的内容: 第一部分:使用iReport制作报表的详细 ...
- [Oracle] 生产上表的列类型更新
由于粗心,数据库脚本生成的时候错将一个类型NUMBER(5)的字段类型改为 VARCHAR2(5) 直接进行表修改会报错,因为数据已经存在,不能进行更新: ); 大体思路如下: 将要更改类 ...
- Java Data Type
官方文档:http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html 转载地址:http://blog.csdn.n ...
- 在Salesforce中创建Web Service供外部系统调用
在Salesforce中可以创建Web Service供外部系统调用,并且可以以SOAP或者REST方式向外提供调用接口,接下来的内容将详细讲述一下用SOAP的方式创建Web Service并且用As ...
- Comet:基于 HTTP 长连接的“服务器推”技术解析
原文链接:http://www.cnblogs.com/deepleo/p/Comet.html 一.背景介绍 传统web请求,是显式的向服务器发送http Request,拿到Response后显示 ...
- MIT 6.828 JOS学习笔记2. Lab 1 Part 1.2: PC bootstrap
Lab 1 Part 1: PC bootstrap 我们继续~ PC机的物理地址空间 这一节我们将深入的探究到底PC是如何启动的.首先我们看一下通常一个PC的物理地址空间是如何布局的: ...