Learn R Programming

flattabler (version 2.1.2)

remove_top: Remove top rows from a pivot table

Description

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

Usage

remove_top(pt, n)

# S3 method for pivot_table remove_top(pt, n)

Value

A pivot_table object.

Arguments

pt

A pivot_table object.

n

A number, number of rows to remove.

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 header information, which must be removed.

See Also

pivot_table

Other pivot table transformation functions: extract_labels(), fill_labels(), fill_values(), remove_agg(), remove_bottom(), remove_cols(), remove_empty(), remove_k(), remove_left(), remove_right(), remove_rows(), replace_dec(), unpivot()

Examples

Run this code

pt <- pt_ex |> remove_top(3)

Run the code above in your browser using DataLab