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

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

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()

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.

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

Author

Vikram B. Baliga