For some reason, the normal R program stopped working on my Mac. So I've needed to utilize RStudio. RStudio does not allow the viewing of the size of the code I am running. Over 1000 outputs of data. Is there a way to increase the number of lines that the console shows?
Asked
Active
Viewed 1,501 times
0
-
Does this answer your question? [avoid string printed to console getting truncated (in RStudio)](https://stackoverflow.com/questions/36800475/avoid-string-printed-to-console-getting-truncated-in-rstudio) – Ian Campbell Apr 28 '20 at 18:01
-
What exactly are you seeing right now? I'm not sure what exactly needs to be changed. – MrFlick Apr 28 '20 at 18:03
-
I'm only seeing the bottom portion of my outputs. I have over 1000 items that I need specific numerical values of, and the console only spits out the bottom 1000 lines of my code. I've set the options to 0, 10000. Typed into the console "options(max.print = 10000)" and run my code, and I still get 1000 lines. – Michael D Apr 30 '20 at 15:17
1 Answers
2
Edit:
Looks like there are two problems.
- R Studio limits the number of lines printed
- R Studio limits the size of the console buffer
To fix number 1, you need Limit length of lines displayed in console to:
Also don't forget to set options(max.print=10000)
or whatever number.
For number two you need:
rstudioapi::writeRStudioPreference("console_max_lines", 10000)

Ian Campbell
- 23,484
- 14
- 36
- 57
-
So I've done the above. Gone to preferences, set the console to display 10000 lines, I also put in my code options(max.print=10000). I still only get the bottom of my code outputs. My code take somewhere between 5 and 50 minutes to run depending on the specifics, but I still want to see all my code in the console. Heaven forbid there's an error somewhere, I have no clue where it is. I have over 2000 outputs that I need, and doing it piece meal takes too much time. – Michael D Apr 29 '20 at 22:21