season_player_game: Boxscore for Each Game in the Season - One line per player...

Description Usage Arguments Value Examples

View source: R/PlayerGameFunctions.R

Description

This function outputs a single dataframe containing all rushing, passing, receiving, fumble, and defensive statistics for each player in each game. Each player is assigned one line associated wih their statisitcs per each game they record a measured statistic

Usage

1
season_player_game(Season, Weeks = 16)

Arguments

Season

(numeric) A 4-digit year associated with a given season

Week

(numeric) A number corresponding to the number of weeks of data you want to be scraped and included in the output. If you input 3, the first three weeks of player statistics will be scraped from the associated season.

Value

A single line for each player in each game they played in. The output is the same as the player_game function but is run for every game in the specified season

Examples

1
2
3
4
5
6
7
# Player-Game function over the entire season in 2010
playerstats.2010 <- season_player_game(2010)
head(playerstats.2010)

# Plot a graph of different play types
library(ggplot2)
ggplot(playerstats.2010, aes(x = PlayType)) + geom_bar()

maksimhorowitz/nflscrapR documentation built on April 3, 2020, 7:40 p.m.