Last chance! 50% off unlimited learning
Sale ends in
Downsample or upsample any tracking data containing x,y,t data using linear interpolation of x,y-coordinates (plus constant interpolation of all other variables in dataframe)
soccerResample(df, r = 10, x = "x", y = "y", t = "t", id = "id")
a dataframe containing x,y-coordinates and time variable
resampling rate in frames per second
name of variables containing x,y-coordinates
name of variable containing time data
name of variable containing player identifier
a dataframe with interpolated rows added
# NOT RUN {
data(tromso)
# resample tromso dataset from ~21 fps to 10 fps
soccerResample(tromso, r=10)
# }
Run the code above in your browser using DataLab