Description Usage Arguments Value Examples
View source: R/tm_player_stats.R
By default the system uses the current year
1 | tm_player_stats(team, year, start_year = NULL, end_year = NULL)
|
team |
Team abbreviation |
year |
Numeric value representing the year. Default is to take the current year if the season has started. Or the most recent year if the season is over. |
start_year |
Numeric value that identifies the beginning year to pull a range of data for the team of interest. This is an optional parameter. |
end_year |
Numeric value that identifies the ending year to pull a range of data for the team of interest. This is an optional parameter. |
list of two data frames. The first list is the batting specific player data and the second list is the pitching specific data
1 2 3 4 | #pulling data from the Florida and Miami Marlins from the years 2002 to 2008.
miami_dat <- tm_player_stats("MIA", start_year = 2002, end_year = 2008)
miami_pitchers <- miami_dat[[2]]
head(miami_pitchers)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.