简体   繁体   English

如何在RStudio控制台输出中插入分页符?

[英]How to insert a page break in the RStudio Console output?

Say I print something which is huge, like str("dataset with 100 columns"). 假设我打印的东西很大,例如str(“带有100列的数据集”)。 This output is too large to see in one shot. 此输出太大而无法一次看到。 Is it possible to get the output in a page like form where whatever fits the screen comes in one shot then on pressing return, the next batch comes up? 是否有可能以类似表格的页面形式获得输出,其中任何适合屏幕的图像都会以一枪的形式出现,然后按回车键,就会出现下一批?

Something like "more" in a linux console? 在Linux控制台中类似“更多”的东西吗?

The page command might do what you're looking for: page命令可能会满足您的需求:

page("dataset with 100 columns")

If I read the documentation correctly, this should call file.show , which pipes the data to the default pager ( less on Unix/Linux systems). 如果我正确阅读了文档,则应调用file.show ,它将数据通过管道传输到默认的寻呼机(在Unix / Linux系统上less )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM