Renames spatial annotation.

renameSpatialAnnotation(object, id, new_id, overwrite = FALSE)

Arguments

object

An object of class SPATA2 or, in case of S4 generics, objects of classes for which a method has been defined.

id

Character value. The current ID of the spatial annotation to be renamed.

new_id

Character value. The new ID of the spatial annotation.

overwrite

Logical value. Must be TRUE to allow overwriting.

inherit

argument_dummy params

Examples

library(SPATA2)

data("example_data")

object <- example_data$object_UKF313T_diet

plotSpatialAnnotations(object)

object <- renameSpatialAnnotation(object, id = "necrotic_area", new_id = "Necrotic_Area_Cap")

plotSpatialAnnotations(object)