bbref_leaderboard: Scrape Pitching or Hitting data from Baseball Reference

Description Usage Arguments Examples

Description

Original code from Bill Petti and modified as needed

Usage

1
bbref_leaderboard(bat_pitch, t1 = NULL, t2 = NULL, n = 30)

Arguments

bat_pitch

either 'bat' or 'pit'

t1

First date data should be scraped from. Should take the form "YEAR-DAY-MONTH"

t2

Second date data should be scraped from. Should take the form "YEAR-DAY-MONTH"

n

use number of days prior from today

Examples

1
2
bb_p<-bbref_leaderboard('pit',"2015-05-10", "2015-06-20")
bb_h<-bbref_leaderboard('bat',n=30) # current year; last 30 days from today

drewgriffith15/griffun documentation built on May 15, 2019, 1:56 p.m.