Rename columns in the active metadata component. When rows are active, renames columns in row_data. When columns are active, renames columns in col_data.
Usage
# S3 method for class 'tidymatrix'
rename(.data, ...)Examples
library(dplyr, warn.conflicts = FALSE)
tm <- tidymatrix(big5_responses, big5_respondents, big5_items)
tm |>
activate(columns) |>
rename(item = item_id)
#> # A tidymatrix: 400 x 30 matrix
#> # Active: columns
#> #
#> # Row data: 400 rows x 8 columns
#> # Column data: 30 rows x 5 columns
#> #
#> # Active data (columns):
#> item trait reversed item_text position
#> 1 E1 Extraversion FALSE I feel comfortable around people. 1
#> 2 E2 Extraversion FALSE I start conversations. 6
#> 3 E3 Extraversion FALSE I enjoy being part of a lively crowd. 11
#> 4 E4 Extraversion FALSE I make friends easily. 16
#> 5 E5 Extraversion TRUE I keep in the background. 21
#> 6 E6 Extraversion TRUE I have little to say to strangers. 26