set_traj_frametime: Redefine frames and time stamps on a per-trajectory basis

View source: R/utility_functions.R

set_traj_frametimeR Documentation

Redefine frames and time stamps on a per-trajectory basis

Description

After a data set has been separated into trajectories, find the earliest frame in each trajectory and set the corresponding time to 0. All subsequent time_sec stamps are computed according to successive frame numbering.

Usage

set_traj_frametime(obj_name)

Arguments

obj_name

The input viewr object; a tibble or data.frame with attribute pathviewr_steps that includes "viewr"

Details

The separate_trajectories() and get_full_trajectories() must be run prior to use. The initial traj_time and traj_frame values are set to 0 within each trajectory.

Value

A viewr object (tibble or data.frame with attribute pathviewr_steps. New columns include traj_time (the trajectory-specific time values) and traj_frame (the trajectory-specific frame numbering).

Author(s)

Vikram B. Baliga

See Also

Other utility functions: clean_by_span(), insert_treatments(), remove_duplicate_frames(), remove_vel_anomalies()


vbaliga/pathviewR documentation built on March 16, 2023, 4:13 p.m.