addSpatialTrajectory | R Documentation |
Functions to add spatial trajectories to the spata2
object. For interactive drawing use createSpatialTrajectories()
.
To set them precisely with code use addSpatialTrajectory()
.
addSpatialTrajectory(
object,
id,
width,
segment_df = NULL,
start = NULL,
end = NULL,
vertices = NULL,
comment = base::character(1),
overwrite = FALSE
)
createSpatialTrajectories(object)
object |
An object of class |
id |
Character value. The id of the spatial trajectory. |
width |
Distance measure. The width of the spatial trajectory. |
segment_df |
Data.frame with four numeric variables that describe the course of the trajectory, namely x, y, xend and yend. |
start , end |
Numeric vectors of length two. Can be provided instead of
|
vertices |
List of numeric vectors of length two or |
overwrite |
Logical value. Must be |
The input spata2
object containing the added or computed
results.
library(SPATA2)
library(SPATAData)
object_t269 <- loadSpataObject(sample_name = "269_T")
object_t269 <-
addSpatialTrajectory(
object = object_t269,
id = "cross_sample",
width = "1.5mm",
start = c(x = "1.35mm", y = "4mm"),
end = c(x = "6.25mm", y = "4mm"),
overwrite = TRUE
)
plotSpatialTrajectories(object_t269, ids = "cross_sample")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.