Description Usage Arguments Value Examples
View source: R/PlayerGameFunctions.R
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
1 | season_player_game(Season, Weeks = 16)
|
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. |
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
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()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.