Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get_bbdb

Get an up to date copy of the Baseball Databank.


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

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

get_bbdb(table = "Batting")

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

## End(Not run)

## Not run: 
get_bbdb(downloadZip = TRUE)

## End(Not run)

baseballDBR

Sabermetrics and Advanced Baseball Statistics

v0.1.2
MIT + file LICENSE
Authors
Kris Eberwein [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.