getGroupNames | R Documentation |
Extracts the group names of a grouping variable.
getGroupNames(object, grouping, ...)
object |
An object of class |
grouping |
Character value. The grouping variable of interest. Use
|
... |
Used to absorb deprecated arguments or functions. |
Character vector
library(SPATA2)
library(patchwork)
data("example_data")
object <- example_data$object_UKF269T_diet
p_before <- plotSurface(object, color_by = "bayes_space")
plot(p_before)
getGroupNames(object, grouping = "bayes_space")
object <- relevelGroups(object, grouping = "bayes_space", new_levels = c("1", "2", "3", "7", "6", "5", "4"))
getGroupNames(object, grouping = "bayes_space")
p_afterwards <- plotSurface(object, color_by = "bayes_space")
# different levels -> different order -> different color assignment
p_before + p_afterwards
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.