View source: R/bref_daily_batter.R
| bref_daily_batter | R Documentation |
This function allows you to scrape basic batter statistics over a custom time frame. Data is sourced from Baseball-Reference.com.
bref_daily_batter(t1, t2)
t1 |
First date data should be scraped from. Should take the form "YEAR-MONTH-DAY" |
t2 |
Last date data should be scraped from. Should take the form "YEAR-MONTH-DAY" |
Returns a tibble of batter performance with the following columns:
| col_name | types |
| bbref_id | character |
| season | integer |
| Name | character |
| Age | numeric |
| Level | character |
| Team | character |
| G | numeric |
| PA | numeric |
| AB | numeric |
| R | numeric |
| H | numeric |
| X1B | numeric |
| X2B | numeric |
| X3B | numeric |
| HR | numeric |
| RBI | numeric |
| BB | numeric |
| IBB | numeric |
| uBB | numeric |
| SO | numeric |
| HBP | numeric |
| SH | numeric |
| SF | numeric |
| GDP | numeric |
| SB | numeric |
| CS | numeric |
| BA | numeric |
| OBP | numeric |
| SLG | numeric |
| OPS | numeric |
try(bref_daily_batter(t1="2015-05-10", t2="2015-06-20"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.