问题
When I run my R studio notebook, the dataframe/tables are defaulted to 10 rows. How can I display 20 rows?
As well, if I have many columns, I have to click the "next" button on the top right to see the other columns. How can I display all the columns at the same time? The browser definitely has enough space to view a bigger table, but could this be another possible solution to view all the columns together: shrink the font in each column? If so, how can I do this?
This is different from the "View" function, and because it's a notebook, the visualization of the dataframe is different from a regular R executable in R studio. Instead of the view function, I'm using the head(x,20) function to display the first 20 rows, but the notebook makes me hit the page 2 tab to see the next 10 rows.
回答1:
For displaying more columns, is it something like this?
```{r set-options, echo=FALSE, cache=FALSE}
options(width = 120)
```
来源:https://stackoverflow.com/questions/45489697/how-to-change-number-of-columns-and-rows-showing-in-r-studio-notebook-dataframe