【R】CentOS7下Rstudio实践初探及遇到的问题

缘起

R安装完毕后,按捺不住,肯定要写点东西玩玩。
然后顺便在使用的过程中,看看有什么坑可以踩踩,顺便记录。

实操

第一步,当然就是进入Rstudio,登录过程出现的问题可以看上一篇博文

第二步,就是导入数据了。但是导入数据的时候,报错。当然, 刚安装好肯定有各种包和环境没有,因此需要下载。但这里报错看看界面上出现

unable to access index for repository http://xxxx

很明显,要么就是配置的http地址过期,要么就是没有配置。
因此我们查看下这个文件Rprofile.site(按照我的配置的话应该在这里/usr/local/R-3.3.2/src/gnuwin32/fixed/etc/Rprofile.site),如果找不到,请find一下。

vim /usr/local/R-3.3.2/src/gnuwin32/fixed/etc/Rprofile.site

修改其中r[“CRAN”] <-http 的内容。当然这个链接你要到官方Rstudio提供的mirror。在 下面给出的china镜像我选择的是清华大学的第二个镜像。即http://mirror.bjtu.edu.cn/cran/。将这个地址写入到site文件中即可。

第三部,重启Rstudio。

rstudio-server start 
#这里还有另外两个命令可以使用:
rstudio-server restart/stop

这样当我们再点击导入csv的时候,就会自动出发下载事件进行下载了。

Installing packages into ‘/home/lekko/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependencies ‘assertthat’, ‘lazyeval’, ‘curl’, ‘tibble’, ‘hms’, ‘R6’, ‘BH’

trying URL 'http://cran.rstudio.com/src/contrib/assertthat_0.1.tar.gz'
Content type 'unknown' length 10187 bytes
==================================================
downloaded 10187 bytes

trying URL 'http://cran.rstudio.com/src/contrib/lazyeval_0.2.0.tar.gz'
Content type 'unknown' length 317272 bytes (309 KB)
==================================================
downloaded 309 KB

trying URL 'http://cran.rstudio.com/src/contrib/curl_2.3.tar.gz'
Content type 'unknown' length 400460 bytes (391 KB)
==================================================
downloaded 391 KB

trying URL 'http://cran.rstudio.com/src/contrib/tibble_1.2.tar.gz'
Content type 'unknown' length 54517 bytes (53 KB)
==================================================
downloaded 53 KB

trying URL 'http://cran.rstudio.com/src/contrib/hms_0.3.tar.gz'
Content type 'unknown' length 7271 bytes
==================================================
downloaded 7271 bytes

trying URL 'http://cran.rstudio.com/src/contrib/R6_2.2.0.tar.gz'
Content type 'unknown' length 203498 bytes (198 KB)
==================================================
downloaded 198 KB

trying URL 'http://cran.rstudio.com/src/contrib/BH_1.62.0-1.tar.gz'
Content type 'unknown' length 10181096 bytes (9.7 MB)
===========
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

乐扣老师lekkoliu

你的鼓励是我最大的科研动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值