soccerVelocity: Compute instantaneous distance, speed and direction from...

Description Usage Arguments Value Examples

View source: R/soccerVelocity.R

Description

Compute instantaneous distance moved (in metres), speed (in metres per second), and direction (in radians) between subsequent frames in a dataframe of x,y-coordinates.

Usage

1

Arguments

dat

dataframe containing unnormalised x,y-coordinates x and y, time variable 't', and player identifier 'id'

Value

a dataframe with columns 'dist', 'speed', and 'direction' added

Examples

1
2
3
4
data(tromso)

# calculate distance, speed, and direction for \code{tromso} dataset
soccerVelocity(tromso)

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