R第2节:windows下载安装RStudio,linux(centos)下载安装RStudio

前言:

RStudio是一款R语言的IDE,R自带的环境操作起来不够方便,而Rstudio很好地解决了这个问题,而且它还具有调试、可视化等功能,支持纯R脚本、Rmarkdown (脚本文档混排)、Bookdown (脚本文档混排成书)、Shiny (交互式网络应用)等。

注:R是RStudio的基础,必须先安装R,再安装RStudio。

R简介、windows/linux(centos)安装R详解:https://blog.csdn.net/weixin_41685388/article/details/103802788

windows安装RStudio

-- 打开RStudio官方网站 https://www.rstudio.com/products/rstudio/download/ 点击Free下的Download

-- All Installers下,选择对应自己系统的合适的版本。这里我们选RStudio-1.2.5033.exe

-- 下载后打开程序进入安装向导,根据提示点击下一步安装即可(本人习惯性的将安装目录指定到自定义的路径下)

安装后找到rstudio.exe打开

linux(centos)安装RStudio

先查看官网介绍:

官网:https://rstudio.com/products/rstudio/download-server/

下载对应版本(我的事centos6.7):

执行命令:

wget https://download2.rstudio.org/server/centos6/x86_64/rstudio-server-rhel-1.2.5033-x86_64.rpm
sudo yum install rstudio-server-rhel-1.2.5033-x86_64.rpm         #root用户就不用sudo
如果有中间报:无法建立 SSL 连接。
wget在使用HTTPS协议时,默认会去验证网站的证书,而这个证书验证经常会失败。
在原命令加上"--no-check-certificate"选项,就能排除掉这个错误
wget --no-check-certificate https://download2.rstudio.org/server/centos6/x86_64/rstudio-server-rhel-1.2.5033-x86_64.rpm

安装R语言的包

在控制台输入R
>install.packages("devtools", dependencies = T)
会跳出Selection: 
选择Chinese shanghai对应的数值即可:Selection: 19
如果安装devtools出现错误:提示xml2安装时退出狀態的值不是0
解决方法 yum install libxml*

安装REmap

library("devtools")
install_github('lchiffon/REmap')
如果安装Remap时出现错误:dependency ‘XML’ is not available for package ‘REmap’
解决方法:install.packages("XML")

发布了103 篇原创文章 · 获赞 75 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/weixin_41685388/article/details/103818946