With any table object, you can produce a summary table that contains nothing more than the table's dimensions: the number of rows and the number of columns. The output summary table will have two columns and two rows. The first is the ".param." column with the labels "rows" and "columns"; the second column, "value", contains the row and column counts.
tt_tbl_dims(tbl)
Arguments
tbl: A data table
obj:<tbl_*> // required
A table object to be used as input for the transformation. This can be a data frame, a tibble, a tbl_dbi object, or a tbl_spark object.
Returns
A tibble object.
Examples
Get the dimensions of the game_revenue dataset that is included in the pointblank package.
tt_tbl_dims(tbl = game_revenue)
#> # A tibble: 2 x 2
#> .param. value
#> <chr> <int>
#> 1 rows 2000
#> 2 columns 11
This output table is useful when a table validation depends on its dimensions. Here, we check that game_revenue has at least 1500 rows.