Learn R Programming

pathviewr (version 1.1.8)

remove_vel_anomalies: Remove any rows which show sharp shifts in velocity that are likely due to tracking errors

Description

Remove any rows which show sharp shifts in velocity that are likely due to tracking errors

Usage

remove_vel_anomalies(
  obj_name,
  target = "velocity",
  method = "gesd",
  alpha = 0.05,
  max_anoms = 0.2
)

Value

A viewr object (tibble or data.frame with attribute pathviewr_steps. Rows in which large anomalies were detected have been removed. No additional columns are created.

Arguments

obj_name

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

target

The column to target; defaults to "velocity"

method

The anomaly detection method; see anomalize::anomalize()

alpha

The width of the "normal" range; see anomalize::anomalize()

max_anoms

The max proportion of anomalies; see anomalize::anomalize()

Author

Vikram B. Baliga

Details

This function runs anomalize::anomalize() on a per-trajectory basis. The separate_trajectories() and get_full_trajectories() must be run prior to use.

See Also

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