soccerResample: Resample the frames per second of any tracking data using...

Description Usage Arguments Value Examples

View source: R/soccerResample.R

Description

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)

Usage

1
soccerResample(df, r = 10, x = "x", y = "y", t = "t", id = "id")

Arguments

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

Value

a dataframe with interpolated rows added

Examples

1
2
3
4
data(tromso)

# resample tromso dataset from ~21 fps to 10 fps
soccerResample(tromso, r=10)

JoGall/soccermatics documentation built on Aug. 12, 2021, 1:20 p.m.