Learn R Programming

flattabler (version 1.0.0)

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)

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

Examples

Run this code
# NOT RUN {
library(tidyr)

pt <- pt_m4 %>% remove_top(1)

pt <- pt_ine2871 %>% remove_top(6)

# }

Run the code above in your browser using DataLab