recodeClusterY.Rd
This function will re-code _feature_ cluster labels based off of a mapping provided by the user, for all fields on a celda object involving cluster labels. e.g. if Y (feature cluster) values range from 1-4 and the user would like all 3's switched to 1's and vice versa, this function can be useful. NOTE: it is recommended that this function's results aren't used to overwrite the original celda model object provided, in the event of a mis-mapping.
recodeClusterY(celda.mod, from, to)
celda.mod | Celda object of class "celda_G" or "celda_CG". |
---|---|
from | Numeric vector. Unique values in the range of 1:L that correspond to the original cluster labels in `celda.mod`. |
to | Numeric vector. Unique values in the range of 1:L that correspond to the new cluster labels. |
Celda object with recoded feature clusters, with class corresponding to that of `celda.mod`.
#>#>#>#>#>#>#>#>#>#>#>#>#>#>celda.mod.reordered.y = recodeClusterY(celda.mod, c(1, 3), c(3, 1))