Description Usage Arguments Value Examples
View source: R/soccerResample.R
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)
1 | soccerResample(df, r = 10, x = "x", y = "y", t = "t", id = "id")
|
df |
a dataframe containing x,y-coordinates and time variable |
r |
resampling rate in frames per second |
x, y |
name of variables containing x,y-coordinates |
t |
name of variable containing time data |
id |
name of variable containing player identifier |
a dataframe with interpolated rows added
1 2 3 4 | data(tromso)
# resample tromso dataset from ~21 fps to 10 fps
soccerResample(tromso, r=10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.