| mergeGroups | R Documentation | 
Merge groups into one group.
mergeGroups(object, grouping, grouping_new, merge, new_group, verbose = NULL)
| object | An object of class  | 
| grouping | Character value. The grouping variable whose groups are supposed to be merged. | 
| grouping_new | Character value or NULL. If character, the results are stored in a new variable named accordingly. If NULL, the grouping variable is updated - DEA results will be discarded. | 
| merge | Character vector or NULL. If character, specifies the groups that are merged together. | 
| new_group | Character value. The new group name of the merge. | 
| verbose | Logical. If  (Warning messages will always be printed.) | 
Only one argument of keep or merge must be specified.
If grouping_new is NULL DEA results of the specified
grouping variable is resetted.
library(SPATA2)
library(tidyverse)
object <- loadExampleObject("UKF275T", meta = TRUE)
object <-
  mergeGroups(
    object = object,
    grouping = "bayes_space",
    grouping_new = "bayes_space_merged",
    merge = c("B1", "B6"),
    new_group = "B1B6_merged"
   )
plotSurface(object, color_by = "bayes_space")
plotSurface(object, color_by = "bayes_space_merged")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.