updateR 使用 R 控制台和 Rstudio 不断失败

use*_*609 4 r

我一直在尝试将 R 版本更新到最新版本。我使用updateR了 R 包提供的installr。我试图从R console和运行它Rstudio。但是,我收到了如下相同的消息。重新启动 R 表明 R 版本仍然是旧版本。

> updateR()
Installing the newest version of R,
please wait for the installer file to be download and executed.
Be sure to click 'next' as needed...
trying URL 'https://cran.rstudio.com/bin/windows/base/R-3.3.1-win.exe'
Content type 'application/x-msdos-program' length 73566547 bytes (70.2 Mb)
opened URL
downloaded 70.2 Mb


The file was downloaded succesfully into:
C:\Users\abcd\AppData\Local\Temp\RtmpOCjWpG/R-3.3.1-win.exe 

 Running the installer now...

 Installation status:  TRUE . Removing the file:
 C:\Users\abcd\AppData\Local\Temp\RtmpOCjWpG/R-3.3.1-win.exe 
 (In the future, you may keep the file by setting keep_install_file=TRUE) 

We can not seem to find the location if the new R you have installed.
The rest of the updating process is aborted, please take care to copy
your packages to the new R installation.
[1] TRUE
Run Code Online (Sandbox Code Playgroud)

ayu*_*ney 7

好的,所以可能的解决方案是:

就我而言,我之前在不同的目录中安装了 R,并使用相同的目录让 R 工作。

因此,可以尝试以下解决方案:

安装更新后的 R 版本设置。可以打开 Rstudio 并按照以下步骤操作:

从 Rstudio 更新 R 的代码:

    # installing/loading the package:
    if(!require(installr)) {
    install.packages("installr"); require(installr)} #load / install+load 
    installr

   # using the package:
     updateR() # this will start the updating process of your R installation.  It will check for newer versions, and if one is available, will guide you through the decisions you'd need to make.
Run Code Online (Sandbox Code Playgroud)

安装 R 后的步骤:

  1. 点击“工具”。
  2. 选择“全局选项”。
  3. 在常规选项卡下,查找 R 版本并单击“更改”
  4. 将出现选择 R 安装弹出窗口,选择安装在您机器上的适当版本。
  5. 点击“确定”
  6. 关闭所有 R 实例,包括 R studio。
  7. 现在在控制台中打开 R studio 和 Type version。Hollaaa,希望这可以解决您的问题。