Add a single new trajectory to trajectory array.
mt_add_trajectory(
data,
use = "trajectories",
save_as = use,
xpos = NULL,
ypos = NULL,
xypos = NULL,
id = "new"
)
a mousetrap data object created using one of the mt_import
functions (see mt_example for details). Alternatively, a trajectory
array can be provided directly (in this case use
will be ignored).
a character string specifying which trajectory data should be used.
a character string specifying where the resulting trajectory data should be stored.
a vector of x positions. Ignored, if xypos
is provided.
a vector of y positions. Ignored, if xypos
is provided.
a matrix, the first column corresponding to the x positions, the second to the y positions.
a character string specifying the identifier of the to be added trajectory.
A mousetrap data object (see mt_example) where the new
trajectory has been added.
If the trajectory array was provided directly as data
, only the
trajectory array will be returned.