refactor {tame} | R Documentation |
Refactor Cluster Levels
Description
Refactor the levels of the chosen clusters.
Usage
refactor(object, ..., inheret_parameters = TRUE)
Arguments
object |
A |
... |
< The name gives the name of the new clustering in the output. The value can be:
When a recording uses the name of an existing clustering, this new clustering will overwrite the existing one. |
inheret_parameters |
A logical. If |
Value
A medic
object with relevant clusterings refactored.
Examples
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")
)
)
[Package tame version 0.0.1 Index]