R/processing_trial_functions.R
resample_movement_cols.RdConvenient wrapper around resample_movement
resample_movement_cols(
df,
.cols = tidyselect::ends_with("_movement_data_0") & !(tidyselect::starts_with("valid")),
sample_rate = NULL
)A trial results data frame.
Columns containing dataframes to resample. (Default: all movement data). Each data frame must have a column 'time'.
New sample rate (Hz) (default 10).
Column containing reference position (e.g. fruit picking position), default is relative to origin (i.e. just resample, no translation)
The data frame with movement data offset and new columns with resampling, with
new column name ending with _resampled.
Non-existing time points for any trial are filled with "NA". Position values will be reoriented to reference position if given.
Returns the data frame with new columns added.
To resample fruit collection and eyetracker data, see
resample_fruit_task_cols and resample_eyetracker_cols.