tm_player_stats: Pull Team Specific Player data for Pitchers and Hitters for...

Description Usage Arguments Value Examples

View source: R/tm_player_stats.R

Description

By default the system uses the current year

Usage

1
tm_player_stats(team, year, start_year = NULL, end_year = NULL)

Arguments

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.

Value

list of two data frames. The first list is the batting specific player data and the second list is the pitching specific data

Examples

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)

williazo/rwindow.baseball documentation built on May 29, 2019, 11:47 a.m.