登录  /  注册
博主信息
博文 291
粉丝 0
评论 0
访问量 432497
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
给R语言RStudio添加阿里云镜像源
原创
1224人浏览过

镜像下载、域名解析、时间同步请点击 阿里云开源镜像站

方法一:

打开RStudio,输入options()$repos查看默认镜像源情况

  1. options()$repos

file

打开tools工具栏,找到Global Options

file

找到Packages,点击右边的add

file

出现添加镜像源的对话框,name处填入aliyun,url填入:https://mirrors.aliyun.com/CRAN/, 点击ok保存

file

在命令栏输入options()$repos查看镜像源情况

file

方法二:

找到C盘,program files文件下,R/R-4.0.3/etc中的Rprofile文件

file

file

原来的:

  1. # Things you might want to change
  2. # options(papersize="a4")
  3. # options(editor="notepad")
  4. # options(pager="internal")
  5. # set the default help type
  6. # options(help_type="text")
  7. options(help_type="html")
  8. # set a site library
  9. # .Library.site <- file.path(chartr("\\", "/", R.home()), "site-library")
  10. # set a CRAN mirror
  11. # local({r <- getOption("repos")
  12. # r["CRAN"] <- "http://my.local.cran"
  13. # options(repos=r)})
  14. # Give a fortune cookie, but only to interactive sessions
  15. # (This would need the fortunes package to be installed.)
  16. # if (interactive())
  17. # fortunes::fortune()

修改后:

  1. # set a CRAN mirror
  2. local({r <- getOption("repos")
  3. r["CRAN"] <- "https://mirrors.aliyun.com/CRAN/"
  4. options(repos=r)})

本文转自:https://blog.csdn.net/sxqcj007/article/details/123181776

本博文版权归博主所有,转载请注明地址!如有侵权、违法,请联系admin@php.cn举报处理!
全部评论 文明上网理性发言,请遵守新闻评论服务协议
0条评论
作者最新博文
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号

  • 登录PHP中文网,和优秀的人一起学习!
    全站2000+教程免费学