ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 给R语言RStudio添加阿里云镜像源

给R语言RStudio添加阿里云镜像源

原创 Linux操作系统 作者:哈哈哈hh 时间:2022-03-10 15:41:26 0 删除 编辑

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

方法一:

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

options()$repos

file

打开tools工具栏,找到Global Options

file

找到Packages,点击右边的add

file

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

file

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

file

方法二:

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

file

file

原来的:

# 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"] <- "
#       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"] <- ""
options(repos=r)})

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


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70003733/viewspace-2869182/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2021-09-10

  • 博文量
    280
  • 访问量
    250855