centerSpatialAnnotation.Rd
Shifts the borders of a spatial annotation in a way that
its center corresponds to the input of c(center_x, center_y)
.
centerSpatialAnnotation(object, ...)
# S4 method for class 'SPATA2'
centerSpatialAnnotation(
object,
id,
center_x,
center_y,
new_id = FALSE,
overwrite = FALSE
)
# S4 method for class 'SpatialData'
centerSpatialAnnotation(
object,
id,
center_x,
center_y,
new_id = FALSE,
overwrite = FALSE
)
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.
Character value specifying the ID of the spatial annotation of interest. If there is only one spatial annotation in the object, the function will default to using it. However, if there are multiple annotations, this argument must be explicitly specified to identify the target annotation.
Distance measures. The new center of the spatial annotation.
Character value or FALSE
. If character, the resulting
spatial annotation is stored under a new ID.
Logical value. Must be TRUE
to allow overwriting.
The updated input object, containing the added, removed or computed results.