More than 1000 lines output in R Studio console

Starting in RStudio 1.3.688, and with the latest rstudioapi from github, it is now possible to do what you want as follows:

rstudioapi::writeRStudioPreference("console_max_lines", 300)

where 300 is the number of lines you'd like your scrollback buffer to be. Keep in mind that large values can make the UI slow.

For those hoping to scroll back to capture the output of long scripts, I encourage you to look into sink() instead.

https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/sink

2 Likes