【问题标题】:RStudio - Change R version doesn't worksRStudio - 更改 R 版本不起作用
【发布时间】:2017-10-17 20:19:20
【问题描述】:

我安装了两个版本的 R(Base-R 和 Microsoft R)。实际上 Microsoft R 版本是默认的,现在我想更改为 Base-R。在 RStudio -> Options 中更改版本非常简单。但是当我选择 Base-R 版本时,我收到以下消息:

“您需要退出并重新打开 RStudio 才能使此更改生效”

然后我按下“OK”,RStudio 停止工作。我多次尝试这个。为什么这不起作用?

将版本更改为 Base-R 的命令是什么?因为我不想卸载 Microsoft R。

谢谢!

【问题讨论】:

  • 请将错误报告发送给 RStudio 支持。话虽如此:您确定您的 RStudio 版本支持两个 R 版本吗?你都更新了吗?
  • 我确信 RStudio 支持这两个版本。而且我什么也没更新。
  • 当我说“版本”时,我并不是指基本 R 与 MS R。我指的是版本号(您应该在向 RStudio 的错误报告中提供)。
  • 在哪里可以找到这个错误报告?而且没有命令可以更改版本吗?

标签: r rstudio microsoft-r


【解决方案1】:

查看 R Studio 的文档,对于 Windows,R Studio 使用系统注册表确定版本,如果在安装 MRS 并插入这些注册表项时,这可能会导致冲突。尝试重新添加 Open Source R 的注册表项,如发现 here:

When you run the R installer, there are options (under ‘Select Additional 
Tasks’) to ‘Save version number in registry’ and (for Administrator 
installs) ‘Associate R with .RData files’.

If you tick the first option, the following string entries are added to the 
Windows registry:

HKEY_LOCAL_MACHINE\Software\R-core\R\Current Version contains the version 
number, currently 3.4.0.
HKEY_LOCAL_MACHINE\Software\R-core\R\[version]\InstallPath (where [version] 
is currently 3.4.0) contains the path to the R home directory.
If you do not have administrative privileges on the machine while running 
the installer, then the entries are created under HKEY_CURRENT_USER. The 
same entries are also created under Software\R-core\R32 or Software\R-
core\R64, for 32- and 64-bit R respectively.

If you tick the second option (shown with administrative privileges only) 
(‘Associate R with .RData files’) then entries are created under 
HKEY_CLASSES_ROOT\.RData and HKEY_CLASSES_ROOT\RWorkspace.

After installation you can add the Registry entries by running RSetReg.exe 
in a sub-folder of the bin folder, and remove them by running this with 
argument /U. Note that this requires administrative privileges unless run 
with argument /Personal and neither sets up nor removes the file 
associations.

在 RStudio 中报告错误的标准方法似乎是在他们的支持社区页面上从here 发布主题为“错误报告”的帖子

【讨论】:

    【解决方案2】:

    我认为这个答案应该可以解决您的问题:

    Cannot Change the Version of R in RStudio

    转到 C:\Users\myaccount\AppData\Roaming\RStudio 并删除“desktop.ini.lock”文件。 或者重命名文件夹

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-09
      • 2017-10-23
      • 2016-08-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多