clust <- medic(complications, id = id, atc = atc, k = 3:4)
# Refactor one clustering
refactor(
clust,
`cluster_1_k=4` = dplyr::recode(`cluster_1_k=4`, IV = "III")
)
# Refactor all clusterings
refactor(
clust,
dplyr::across(
dplyr::everything(),
~dplyr::recode(., IV = "III")
)
)
Run the code above in your browser using DataLab