How to paginate R output?
Have a look at ?page
and ?file.show
:
page(runif(1e5))
+1 to @sgibb, page()
is really useful. There are some cases where I want to go with a more complicated solution though. You can also use ?sink in conjunction with ?file.show:
sink(file="tempSink", type="output")
...
# various commands
...
sink()
file.show(file="tempSink", delete.file=TRUE, title="my output")
For example, page()
only displays one output, but you may want to look at several together. I've also noted that sometimes page()
doesn't work, but the above will (I don't know why--it might just be a bug).