# NOT RUN {
library(dplyr)
data(tromso)
# draw path of Tromso #8 over first 3 minutes (1800 frames)
tromso %>%
filter(id == 8) %>%
top_n(1800) %>%
soccerPath(col = "red", theme = "grass", arrow = "r")
# draw path of all Tromso players over first minute (600 frames)
tromso %>%
group_by(id) %>%
slice(1:1200) %>%
soccerPath(id = "id", theme = "light")
# }
Run the code above in your browser using DataLab