Reputation: 380
I am running a series of lengthy analyses, and the RStudio console only displays results for the last 1,000 lines, where I would need about 30,000 lines to see all results at once. I tried to adjust the console line limit, by changing the default value of 1,000 to 30,000 in the global options, but still no success. Is there any other way of increasing the console line limit (perhaps with some code)?
Upvotes: 4
Views: 4934
Reputation: 86
It looks like the length of the console is currently capped by design, for performance reasons:
"The reason the console is limited to 1,000 lines is that, on most systems, RStudio's interface slows down considerably when the console grows too large. In a future version of RStudio, we hope to implement virtual scrolling for the console, so that it can grow without slowing down the interface." (jonathan from Rstudio 2017-12-11, https://community.rstudio.com/t/more-than-1000-lines-output-in-r-studio-console/3288/2)
The workaround I use is to save the extra long console output to a text file and just work from there. Any output produced by commands that replace the ...
will be saved to the text file when you execute the code.
setwd("C:/My Output Folder")
sink(file='myoutput.txt')
...
sink()
Upvotes: 5