[Maturing]

One of the main features of the tbl_df class is the printing:

  • Tibbles only print as many rows and columns as fit on one screen, supplemented by a summary of the remaining rows and columns.

  • Tibble reveals the type of each column, which keeps the user informed about whether a variable is, e.g., <chr> or <fct> (character versus factor).

Printing can be tweaked for a one-off call by calling print() explicitly and setting arguments like n and width. More persistent control is available by setting the options described below.

Arguments

x

Object to format or print.

...

Other arguments passed on to individual methods.

n

Number of rows to show. If NULL, the default, will print all rows if less than option tibble.print_max. Otherwise, will print tibble.print_min rows.

width

Width of text output to generate. This defaults to NULL, which means use getOption("tibble.width") or (if also NULL) getOption("width"); the latter displays only the columns that fit on one screen. You can also set options(tibble.width = Inf) to override this default and always print all columns.

n_extra

Number of extra columns to print abbreviated information for, if the width is too small for the entire tibble. If NULL, the default, will print information about at most tibble.max_extra_cols extra columns.

Value

Nothing

Package options

The following options are used by the tibble and pillar packages to format and print tbl_df objects. Used by the formatting workhorse trunc_mat() and, therefore, indirectly, by print.tbl().

  • tibble.print_max: Row number threshold: Maximum number of rows printed. Set to Inf to always print all rows. Default: 20.

  • tibble.print_min: Number of rows printed if row number threshold is exceeded. Default: 10.

  • tibble.width: Output width. Default: NULL (use width option).

  • tibble.max_extra_cols: Number of extra columns printed in reduced form. Default: 100.

Examples

library(dplyr)
#> 
#> Attaching package: ‘dplyr’
#> The following object is masked from ‘package:tidySummarizedExperiment’:
#> 
#>     bind_rows
#> The following objects are masked from ‘package:ttservice’:
#> 
#>     bind_cols, bind_rows
#> The following object is masked from ‘package:Biobase’:
#> 
#>     combine
#> The following objects are masked from ‘package:GenomicRanges’:
#> 
#>     intersect, setdiff, union
#> The following object is masked from ‘package:GenomeInfoDb’:
#> 
#>     intersect
#> The following objects are masked from ‘package:IRanges’:
#> 
#>     collapse, desc, intersect, setdiff, slice, union
#> The following objects are masked from ‘package:S4Vectors’:
#> 
#>     first, intersect, rename, setdiff, setequal, union
#> The following objects are masked from ‘package:BiocGenerics’:
#> 
#>     combine, intersect, setdiff, union
#> The following object is masked from ‘package:matrixStats’:
#> 
#>     count
#> The following objects are masked from ‘package:stats’:
#> 
#>     filter, lag
#> The following objects are masked from ‘package:base’:
#> 
#>     intersect, setdiff, setequal, union
pasilla  %>% print()
#> # A SummarizedExperiment-tibble abstraction: 102,193 × 5
#> # Features=14599 | Samples=7 | Assays=counts
#>    .feature    .sample counts condition type      
#>    <chr>       <chr>    <int> <chr>     <chr>     
#>  1 FBgn0000003 untrt1       0 untreated single_end
#>  2 FBgn0000008 untrt1      92 untreated single_end
#>  3 FBgn0000014 untrt1       5 untreated single_end
#>  4 FBgn0000015 untrt1       0 untreated single_end
#>  5 FBgn0000017 untrt1    4664 untreated single_end
#>  6 FBgn0000018 untrt1     583 untreated single_end
#>  7 FBgn0000022 untrt1       0 untreated single_end
#>  8 FBgn0000024 untrt1      10 untreated single_end
#>  9 FBgn0000028 untrt1       0 untreated single_end
#> 10 FBgn0000032 untrt1    1446 untreated single_end
#> # ℹ 40 more rows