dplyr::tbl_df 填满整个屏幕

dplyr::tbl_df fill whole screen

dplyr::as.tbl(mtcars) 只填满了屏幕的 10 行,如下图所示:

是否可以配置R,如果tbl_df可以在没有任何数据'falling off the window'的情况下填充整个R window(如mtcars的情况),那么dplyr 将强制 tbl_df 填满整个 window。

所以我想 dplyr::as.tbl(mtcars) 的输出是:

实现此目的的几种方法:

# show up to 1000 rows and all columns *CAPITAL V in View*
df %>% View()

# set option to see all columns and fewer rows
options(dplyr.width = Inf, dplyr.print_min = 6)

# reset options to defaults (or just close R)
options(dplyr.width = NULL, dplyr.print_min = 10)

# for good measure, don't forget about glimpse()...
df %>% glimpse()