【问题标题】:Why the R version is different in Console and the Terminal为什么控制台和终端中的 R 版本不同
【发布时间】:2019-11-28 03:50:56
【问题描述】:

我打开了 RStudio 服务器,但是控制台中的 R 版本是 3.4.4,终端中的 R 版本是 3.6.1。如何在 Console 中更新 R 版本?

in Console:
> if (!requireNamespace("BiocManager", quietly = TRUE))
+     install.packages("BiocManager")
Installing package into ‘/home/jack/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘BiocManager’ is not available (for **R version 3.4.4**)
Error in readRDS(pfile) : 
  cannot read workspace version 3 written by R 3.6.1; need R 3.5.0 or newer


in Terminal:
(base) jack@omnisky:~$ R

R version 3.6.1 (2019-07-05) -- "Action of the Toes"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

【问题讨论】:

  • 你能说得具体点吗?(>▽
  • 参见RStudio服务器手册中的“指定R版本”:support.rstudio.com/hc/en-us/articles/…升级R后是否重启了RStudio服务器?
  • 我重启了Rstudio,它可以工作了,谢谢!

标签: r ubuntu rstudio


【解决方案1】:

在终端执行此命令:rstudio-server restart 谢谢大家的帮助。

【讨论】:

    【解决方案2】:

    由于我没有足够的声誉来发表评论,所以我会在这里写:

    我的假设是 Rstudio 中使用的 R 安装与您系统(终端)中安装的不同。

    因此,正如@jogo 建议的那样,您应该尝试检查“main R”的安装位置,并在 RStudio 中选择/粘贴该路径(工具 -> 选项 -> 常规)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-07-26
      • 2023-03-31
      • 2020-07-05
      • 1970-01-01
      • 2021-08-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多