我打开了RStudio服务器,但在Console中R版本是3.4.4,在Terminal中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.
答案 0 :(得分:1)
在终端:rstudio-server restart
中执行此命令
谢谢大家的帮助。
答案 1 :(得分:0)
由于我没有足够的声誉来发表评论,所以我在这里写下:
我的假设是Rstudio中使用的R安装与系统(终端)中安装的R安装不同。
因此,按照@jogo的建议,您应尝试检查“ main R”的安装位置,然后在RStudio中选择/粘贴该路径(“工具”->“选项”->“常规”)。