| renameGroups | R Documentation | 
Allows to rename groups within a grouping variable. Make sure
to rename tissue sections with renameTissueSection()!
renameGroups(object, grouping, ..., keep_levels = NULL)
renameTissueSection(object, ...)
| object | An object of class  | 
| grouping | Character value. The grouping variable of interest. Use
 | 
| ... | The groups to be renamed specified according to the following
syntax: 'new_group_name'  | 
relevelGroups()
library(SPATA2)
data("example_data")
## Example 1 - rename normal grouping variables
object <- example_data$object_UKF269T_diet
plotSurface(object, color_by = "histology")
object <-
 renameGroups(
  object = object,
  grouping = "histology",
  "hist1" = "tumor", "hist2" = "transition", "hist3" = "infiltrated"
  )
plotSurface(object, color_by = "histology")
## Example 2 - rename tissue secions
object <- example_data$object_lmu_mci_diet
object <- identifyTissueOutline(object)
plotSurface(object, color_by = "tissue_section")
object <-
 renameTissueSection(
   object = object,
   "lower_hemisphere" = "tissue_section_1", "upper_hemisphere" = "tissue_section_2"
   )
plotSurface(object, color_by = "tissue_section")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.