addSpatialTrajectory | R Documentation |
Adds a spatial trajectory using coordinate input.
addSpatialTrajectory(
object,
id,
width = NULL,
traj_df = NULL,
start = NULL,
end = NULL,
comment = base::character(1),
overwrite = FALSE,
...
)
object |
An object of class |
id |
Character value. The id of the spatial trajectory. |
width |
Distance measure. The width of the spatial trajectory. |
start , end |
Numeric vectors of length two. Can be provided instead of
|
overwrite |
Logical value. Must be |
... |
Used to absorb deprecated arguments or functions. |
segment_df |
Data.frame with x and y as variables corresponding to the vertices of the trajectory. IN case of more than three rows the trajectory is assumed to have a curve. |
vertices |
List of numeric vectors of length two or |
The updated input object, containing the added, removed or computed results.
createSpatialTrajectories()
library(SPATA2)
library(tidyverse)
data("example_data")
object <- example_data$object_UKF275T_diet
object <-
addSpatialTrajectory(
object = object,
id = "cross_sample",
width = "1.5mm",
start = c(x = "1.35mm", y = "4mm"),
end = c(x = "6.25mm", y = "4mm"),
overwrite = TRUE
)
plotSpatialTrajectories(object, ids = "cross_sample")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.