Answers:
您也可以使用
print(tbl_df(df), n=40)
或在管道操作员的帮助下
df %>% tbl_df %>% print(n=40)
要打印所有行,请指定 tbl_df %>% print(n = Inf)
n并且已经在管道中,则可以使用df %>% tbl_df %>% print(n = nrow(.))
n = Inf打印所有行。
print(带有小标题)还具有width = 和n_extra = 选项,以控制直接或间接打印多少列。
tbl_df %>% print(n = Inf)可以为此工作。
print(n = ...)在小标题显示中打开科学计数法吗?
您可以使用as.data.frame或print.data.frame。
如果要将其设置为默认值,则可以更改dplyr.print_max选项的值。
options(dplyr.print_max = 1e9)
该tibble小品有一个更新的方式更改其默认的打印行为:
您可以使用以下选项控制默认外观:
options(tibble.print_max = n, tibble.print_min = m):如果多于n行,则仅打印前m行。使用options(tibble.print_max = Inf)始终显示所有行。
options(tibble.width = Inf)不管屏幕的宽度如何,都将始终打印所有列。
例子
这将始终打印所有行:
options(tibble.print_max = Inf)
这实际上不会将打印限制为50行:
options(tibble.print_max = 50)
但这会将打印限制为50行:
options(tibble.print_max = 50, tibble.print_min = 50)
print(n=100)似乎可以满足我的要求。(count()例如,来自的汇总表应该完整显示,而我确实希望我的数据表被截断。)
View与"tbl_df"对象保持不变。