This function processes and prepares trajectory data for plotting in an ENA set. It handles rotation, grouping, and filling missing steps in the trajectory.
prepare_trajectory_data(
x = NULL,
by = x$`_function.params`$conversation[1],
rotation_matrix = x$rotation.matrix,
points = NULL,
units = points,
units_by = x$`_function.params`$units,
steps = NULL
)
A data table containing the processed trajectory data, including dimensions and metadata.
An ENA set object. If `NULL`, other parameters must be provided.
A character vector specifying the grouping variables for the trajectory. Default is the first conversation parameter in the ENA set.
A matrix used to rotate the points. Default is the rotation matrix from the ENA set.
A data table of points to be processed. Default is the points from the ENA set.
A data table of units corresponding to the points. Default is the trajectories or points from the ENA set.
A character vector specifying the unit grouping variables. Default is the unit parameters from the ENA set.
A data table specifying the steps for the trajectory. If `NULL`, steps are generated automatically.