powered by
Remove right columns from the pivot table represented by the object.
remove_right(pt, n)# S3 method for pivot_table remove_right(pt, n)
# S3 method for pivot_table remove_right(pt, n)
A pivot_table object.
pivot_table
A number, number of columns to remove.
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.
This function is very useful because it is not necessary to know the number of columns in the table.
Other pivot table definition functions: define_labels(), divide(), get_page(), remove_bottom(), remove_cols(), remove_empty(), remove_left(), remove_rows(), remove_top(), set_page(), view_table_attr()
define_labels()
divide()
get_page()
remove_bottom()
remove_cols()
remove_empty()
remove_left()
remove_rows()
remove_top()
set_page()
view_table_attr()
library(tidyr) pt <- pt_m4 %>% remove_right(2)
Run the code above in your browser using DataLab