soccerResample: Resample the frequency of x,y,t- time series with linear interpolation of x,y-coordinates.
Description
Downsample or upsample dataframe containing x,y-coordinates and a time variable `t` with linear interpolation of x,y-coordinates and constant interpolation of all other variables.
Usage
soccerResample(dat, r = 10, x = "x", y = "y", z = "z", t = "t")
Arguments
dat
= dataframe containing x,y-coordinates with time variable
r
resampling rate in frames per second
x, y, z
= name of variables containing x,y(,z)-coordinates
t
= name of variable containing time data
Examples
Run this code# NOT RUN {
# resample tromso dataset from ~21 fps to 10 fps
soccerResample(tromso)
# }
Run the code above in your browser using DataLab