tagSpatialAnnotations.Rd
Adjusts tags of spatial annotations.
tagSpatialAnnotations(object, ...)
# S4 method for class 'SPATA2'
tagSpatialAnnotations(object, ids, tags, opt = "add")
# S4 method for class 'SpatialData'
tagSpatialAnnotations(object, ids, tags, opt = "add")
An object of class SPATA2
or, in case of S4 generics,
objects of classes for which a method has been defined.
Used to absorb deprecated arguments or functions.
A character vector of IDs naming the spatial annotations that are affected by the changes.
A character vector of tags.
A character string specifying the kind of adjustment: either 'add' to add tags to existing tags or 'set' to replace existing tags with the new ones.
The updated input object, containing the added, removed or computed results.
library(SPATA2)
data("example_data")
object <- example_data$object_UKF313T_diet
plotSpatialAnnotations(object)
getSpatAnnTags(object, simplify = FALSE)
object <- tagSpatialAnnotations(object, ids = c("necrotic_edge", "necrotic_edge2"), tags = "edge")
getSpatAnnTags(object, simplify = FALSE)