RStudio全局设置(选项)导出/导入 [英] RStudio global settings (options) Export/Import

查看:513
本文介绍了RStudio全局设置(选项)导出/导入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想导出/导入RStudio全局选项,通常可以在RStudio的工具">全局选项..."中找到并设置它.

I would like to export/import RStudio global options, which can typically found and set in RStudio at Tools> Global Options...

理想情况下,我可以运行一行代码,将现有设置保存到文件中. 然后运行另一行代码,以从该文件中加载这些设置.

Ideally I could run a line of code, saving the existing settings to a file. Then run another line of code to load those settings from this file.

这些选项包括诸如GUI的深色主题或制表符宽度等设置.

These options include settings such as a Dark Theme for the GUI, or Tab Width etc.

这具有多种用途,但我的特定用例是我启动虚拟环境以利用云计算.每次关闭和/或启动新环境时,都需要重新应用这些各种设置(或使用默认设置).

This has a range of uses but my specific use case is that I spin up virtual environments to utilize cloud computing. Each time I shutdown and/or spin-up a new environment I need to apply these various settings anew (or work with the defaults).

搜索了一会儿之后,我发现的全部是未答复的用户请求.尽管请求没有得到答复,但我觉得即使不完善,也存在/应该有一种现有的方法.

After searching for a while all I have found is this unanswered user request. Despite the unanswered request, I feel like there is/should be an existing way to do this, even if imperfect.

在此先感谢您的帮助/指导

Thanks in advance for any help/direction

推荐答案

啊!我找到了一个相关的支持页面: https://support.rstudio. com/hc/en-us/articles/200534577-Reset-RStudio-Desktop-s-State

Aha! I found a relevant support page: https://support.rstudio.com/hc/en-us/articles/200534577-Resetting-RStudio-Desktop-s-State

TL; DR:
大多数设置存储在"RStudio-Desktop"文件夹中.确切地说:

TL;DR:
Most settings are stored in a "RStudio-Desktop" folder. To be exact:

  • Windows:%localappdata%\ RStudio-Desktop
    (仅供参考:%localappdata%通常解析为C:\ Users \ {username} \ AppData \ Local [1] )
  • Unix/MacOS:〜/.rstudio-desktop
  • Windows: %localappdata%\RStudio-Desktop
    (fyi: %localappdata% usually resolves to C:\Users\{username}\AppData\Local [1])
  • Unix / MacOS: ~/.rstudio-desktop

我已确认删除/覆盖该文件夹及其备份会从备份之时起恢复设置.

I have confirmed that deleting/overriding that folder with a backup of it restores the settings from the time of the backup.

一些其他信息(例如最后一个窗口的大小)可能存储在

Some further information (e.g. last window size) may be stored at

  • Windows:%appdata%\ RStudio
  • Unix:〜/.config/RStudio
    (我猜想MacOS也是一样,但是相关部分的措辞有点奇怪,所以我不确定.)
  • Windows: %appdata%\RStudio
  • Unix: ~/.config/RStudio
    (I'm guessing it's the same for MacOS, but the relevant section is worded it bit weirdly, so I'm unsure.)

这篇关于RStudio全局设置(选项)导出/导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆