powered by
Remove the columns whose numbers are indicated from the pivot table represented by the object.
remove_cols(pt, c)# S3 method for pivot_table remove_cols(pt, c)
# S3 method for pivot_table remove_cols(pt, c)
A pivot_table object.
pivot_table
A vector of numbers, column numbers.
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.
Other pivot table definition functions: define_labels(), divide(), get_page(), remove_bottom(), remove_empty(), remove_left(), remove_right(), remove_rows(), remove_top(), set_page(), view_table_attr()
define_labels()
divide()
get_page()
remove_bottom()
remove_empty()
remove_left()
remove_right()
remove_rows()
remove_top()
set_page()
view_table_attr()
library(tidyr) pt <- pt_m4 %>% remove_cols(7) pt <- pt_m4 %>% remove_cols(c(6,7))
Run the code above in your browser using DataLab