Closed chuxinyuan closed 2 years ago
试了下 reprex::reprex(devtools::session_info())
输出结果也有问题。不同的地方如下:
reprex::reprex(devtools::session_info())
输出的错误信息:
#> setting value
#> ui X11
devtools::session_info()
输出的正确信息:
setting value
ui RStudio
rstudio 1.4.1717 Juliet Rose (desktop)
所以我觉得这应该是 reprex 包的问题。
这是因为 reprex 在新的 R 进程中运行代码,而不是在当前 R 进程中。新的 R 进程不知道当前 R 进程中关于 RStudio 的任何信息。
xfun::session_info("knitr")
输出结果如下:reprex::reprex(xfun::session_info("knitr"))
输出结果如下:Created on 2022-01-15 by the reprex package (v2.0.1)
By filing an issue to this repo, I promise that
xfun::session_info('xfun')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('yihui/xfun')
.I understand that my issue may be closed if I don't fulfill my promises.