给R语言RStudio添加阿里云镜像源
镜像下载、域名解析、时间同步请点击 阿里云开源镜像站
方法一:
打开RStudio,输入options()$repos查看默认镜像源情况
options()$repos
打开tools工具栏,找到Global Options
找到Packages,点击右边的add
出现添加镜像源的对话框,name处填入aliyun,url填入:https://mirrors.aliyun.com/CRAN/, 点击ok保存
在命令栏输入options()$repos查看镜像源情况
方法二:
找到C盘,program files文件下,R/R-4.0.3/etc中的Rprofile文件
原来的:
# Things you might want to change
# options(papersize="a4")
# options(editor="notepad")
# options(pager="internal")
# set the default help type
# options(help_type="text")
options(help_type="html")
# set a site library
# .Library.site <- file.path(chartr("\\", "/", R.home()), "site-library")
# set a CRAN mirror
# local({r <- getOption("repos")
# r["CRAN"] <- "http://my.local.cran"
# options(repos=r)})
# Give a fortune cookie, but only to interactive sessions
# (This would need the fortunes package to be installed.)
# if (interactive())
# fortunes::fortune()
修改后:
# set a CRAN mirror
local({r <- getOption("repos")
r["CRAN"] <- "https://mirrors.aliyun.com/CRAN/"
options(repos=r)})
本文转自:https://blog.csdn.net/sxqcj007/article/details/123181776
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
· SQL Server 2025 AI相关能力初探
· 为什么 退出登录 或 修改密码 无法使 token 失效