get_bbdb: Get an up to date copy of the Baseball Databank.

Description Usage Arguments Examples

View source: R/get_bbdb.R

Description

Download the newest version of the Baseball Databank from the Chadwick Bureau GitHub repository. This is the source of Sean Lahman's baseball database and is always under development. This function will read the .csv files and return them as data frames. There is also an option to download the entire directory.

Usage

1
get_bbdb(table = NULL, downloadZip = FALSE, AllTables = FALSE)

Arguments

table

The tables you would like to download. Uses Lahman table names Ex. "Batting", "Master", "AllstarFull", etc... If this argument is left as NULL, the function will download all twenty-seven tables.

downloadZip

If true, this will download a zip file of all twenty-seven tables in .csv format to your working directory.

AllTables

If true, this will download all the tables in the database. The default is set to false.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
get_bbdb(table = "Batting")

## Not run: 
get_bbdb(table = c("Batting", "Pitching"))

## End(Not run)

## Not run: 
get_bbdb(AllTables = TRUE)

## End(Not run)

keberwein/moneyball documentation built on May 20, 2019, 8:29 a.m.