View over 1000 lines in RStudio

In RStudio, when you use the View() function, it allows you to see up to 1000 lines. Is there a way to see more than that. I know that you can pick up a look and see lines 1000-2000, for example, but I would like to see 1-2000. The best I could find was a comment about a year ago that it was not possible at that time, but they planned to fix it.

Here is an example (note: I assume that you have to run this in RStudio).

 rstudio <- (1:2000) View(rstudio) 
+6
source share
2 answers

The View command is for a small sub window. You can easily view the full value in the console window. If you want to have the same layout, use cbind.

 cbind(rstudio) 

which actually even gives you the same beautiful line numbering setting

And if it's too bulky

 pview <- function(x, rows=100) { if (length(x) > rows) print(cbind(x)) else print(cbind(head(x, rows/2))) print(cbind(tail(x, rows/2))) } pview(rstudio, 1998) 

you will need to clear this to get the line names in the ruler

+5
source

You can change this parameter, for example: Variants (max.print = 5000)

+4
source

Source: https://habr.com/ru/post/950849/


All Articles