在Rstudio中,全局选项是如何生效的?

问题描述 投票:0回答:1

在r studio中,菜单中“工具”下有一个全局选项。

我将包默认包存储库更改为

https://mirrors.tuna.tsinghua.edu.cn/CRAN

但是在

options()
中,repos设置是

https://packagemanager.posit.co/cran/__linux__/centos7/2024-04-07

我问了chatgpt,它告诉我在这种情况下,options() 优先。

所以我想知道当我更改全局选项中的设置时,实际上更改了哪些文件或哪些变量,以便R知道它已更改并且它可以具有选项高于全局选项的优先级的感觉。

我检查了项目的 .Rprofile 和我的 ~/Renviron 文件夹,当我更改全局选项时,两者都没有更改。

r rstudio
1个回答
0
投票

在标准 Windows Rstudio 设置中,更改全局选项上的 CRAN 镜像将被记录到文件中: C:\Users\xxxx\AppData\Roaming\RStudio studio-prefs.json

© www.soinside.com 2019 - 2024. All rights reserved.