Skip to contents

Remove bottom rows from the pivot table represented by the object.

Usage

remove_bottom(pt, n)

# S3 method for pivot_table
remove_bottom(pt, n)

Arguments

pt

A pivot_table object.

n

A number, number of rows to remove.

Value

A pivot_table object.

Details

A pivot table should only contain label rows and columns, and an array of values, usually numeric data.

All rows not belonging to the pivot table must be removed. It is common to find rows with footer information, which must be removed.

This function is very useful because it is not necessary to know the number of rows in the table.

See also

Examples


pt <- pt_ex |> remove_bottom(3)