为什么我在使用最新版本的 R 和 Rstudio 时没有遇到任何问题?
Why am I not having any problems with the lastest versions of R and Rstudio?
我使用的是 R
和 Rstudio
的最新版本,并且我的工作完全在 Rstudio
上进行。关于我的 OS 和 R
版本的信息:
> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.1.0 tools_4.1.0
关于 R
版本的更多详细信息:
> version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 4
minor 1.0
year 2021
month 05
day 18
svn rev 80317
language R
version.string R version 4.1.0 (2021-05-18)
nickname Camp Pontanezen
在 Rstudio
中,当我转到 帮助 > 检查更新 时,我得到了这个:
或使用versionInfo
:
> library(rstudioapi)
> versionInfo()[2:4] # ignoring the `$citation` which is not necessary for this question
$mode
[1] "desktop"
$version
[1] ‘1.4.1103’
$release_name
[1] "Wax Begonia"
人们遇到的主要问题之一是 ggplot2
相关问题。似乎人们无法在最新版本的 Rstudio
上使用最新版本的 R
生成 ggplot2
图。但这对我来说非常好。例如:
> library(ggplot2)
> ggplot(mtcars, aes(hp, mpg)) + geom_point()
为什么会这样?我是否应该担心我当前的项目突然崩溃并且无法在未来的更新中重现?
此外,我不确定我是否应该使用 Rstudio
的 Preview
版本,还是继续使用当前版本以确保我的项目安全。
这个问题似乎是 Linux 和 macOS 特有的。
在 this issue 和我能找到的所有其他错误报告中,特别提到了 Linux 或 macOS。 但据我所知,还没有官方确认。
为了证实这个理论,我在我的 Ubuntu 和 Windows 10 台机器上测试了你的代码:在 Linux 我遇到了问题中描述的崩溃。 在 Windows 我没有遇到任何问题。
进一步说明,我在您的具体示例中遇到了这个问题,但自从上周安装 R 4.1.0 后就没有注意到它。为什么?因为我很少使用 R 脚本,而且这个问题显然不会影响控制台或 R Markdown(编织或 运行 只是块)。两者都没有问题运行例子。
所以我相信你没有必要更新到预览。对于使用 Unix 系统的人来说,它看起来有点不同。如果你经常使用 R 脚本,你应该考虑问题中链接的预览或切换到 R Markdown。