查看整个数据框架包装在tbl_df? [英] View entire data frame when wrapped in tbl_df?

查看:779
本文介绍了查看整个数据框架包装在tbl_df?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

tibble (以前 tbl_df )是由 dplyr 数据帧操作包,它防止在意外调用数据帧时出现长表输出。

tibble (previously tbl_df) is a version of a data frame created by the dplyr data frame manipulation package in R. It prevents long table outputs when accidentally calling the data frame.

一旦数据帧被包装 tibble / tbl_df ,是否有命令查看整个数据框架(数据的所有行和列)框架)?

Once a data frame has been wrapped by tibble/tbl_df, is there a command to view the whole data frame though (all the rows and columns of the data frame)?

如果我使用 df [1:100,] ,我将看到所有的100行,但如果我使用 df [1:101,] ,它只会显示前10行。我想轻松地显示所有的行,以便快速滚动浏览它们。

If I use df[1:100,], I will see all 100 rows, but if I use df[1:101,], it will only display the first 10 rows. I would like to easily display all the rows to quickly scroll through them.

有没有一个dplyr命令来抵消这个或者打开数据框架的方式?

Is there either a dplyr command to counteract this or a way to unwrap the data frame?

推荐答案

您还可以使用

print(tbl_df(df), n=40)

或借助管道运算符

df %>% tbl_df %>% print(n=40)

这篇关于查看整个数据框架包装在tbl_df?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆