A pivot table should only contain label rows and columns, and an array of values, usually numeric data. Values, even though they are numbers, are represented as text and sometimes include a thousands separator that can be removed using this function.
Details
To correctly carry out this operation, the number of rows and columns that contain labels must be defined, and the table must only contain the pivot table rows and columns.
See also
Other pivot table transformation functions:
extract_labels()
,
fill_labels()
,
fill_values()
,
remove_agg()
,
remove_bottom()
,
remove_cols()
,
remove_empty()
,
remove_left()
,
remove_right()
,
remove_rows()
,
remove_top()
,
replace_dec()
,
unpivot()
Examples
pt <-
pt_ex |>
remove_top(1) |>
define_labels(n_col = 2, n_row = 2) |>
remove_k()