remove_cols {flattabler} | R Documentation |
Remove columns from a pivot table
Description
Remove the columns whose numbers are indicated from the pivot table represented by the object.
Usage
remove_cols(pt, c)
## S3 method for class 'pivot_table'
remove_cols(pt, c)
Arguments
pt |
A |
c |
A vector of numbers, column numbers. |
Details
A pivot table should only contain label rows and columns, and an array of values, usually numeric data.
All columns not belonging to the pivot table must be removed.
Value
A pivot_table
object.
See Also
Other pivot table transformation functions:
extract_labels()
,
fill_labels()
,
fill_values()
,
remove_agg()
,
remove_bottom()
,
remove_empty()
,
remove_k()
,
remove_left()
,
remove_right()
,
remove_rows()
,
remove_top()
,
replace_dec()
,
unpivot()
Examples
pt <- pt_ex |> remove_cols(7)
pt <- pt_ex |> remove_cols(c(6,7))
[Package flattabler version 2.1.2 Index]