【问题标题】:How Do I View All Output in Rstudio Console When the Output is Large输出很大时如何在 Rstudio 控制台中查看所有输出
【发布时间】:2021-03-27 19:21:12
【问题描述】:

举个例子,

rnorm(9999999)

在控制台中产生一个非常大的输出,即使我向上滚动到最后一个限制,我也看不到所有输出。

我更喜欢不需要我保存输出的解决方案。

【问题讨论】:

  • options(max.print = big_number)
  • 也许您正在寻找page()
  • community.rstudio.com/t/… 建议 rstudioapi::writeRStudioPreference("console_max_lines", <size>) 可能会这样做,如果我理解正确的话(我没有尝试过 - 它需要 RStudio 1.3.688,我没有在工作中) .可能还需要设置max.print,正如 Ronak Shah 所建议的那样

标签: r rstudio


【解决方案1】:

oo <- options(max.print=2e+06)  ## set and store defaults
options(oo)  ## restore defaults

显示 200 万行 (9999999 / 5)。

另外考虑线截断。在 RGui 中,它可以使用 [Edit] > [GUI preferences] 进行配置(见下图)。

RStudio 也有类似的选项,请咨询this answer 了解更多信息。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-03-28
    • 2020-06-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-03
    相关资源
    最近更新 更多