RStudio - 更改R版本不起作用

时间:2017-05-18 06:54:24

标签: r rstudio microsoft-r

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

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

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

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

谢谢!

2 个答案:

答案 0 :(得分:1)

查看R Studio的文档,对于Windows,R Studio使用系统注册表确定版本,如果在安装MRS并插入这些注册表项时,这可能会导致冲突。尝试重新添加开源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的支持社区页面中发布主题"错误报告"

答案 1 :(得分:0)

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

Cannot Change the Version of R in RStudio

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