Learn R Programming

baseballr (version 0.8.6)

ncaa_scrape: Scrape NCAA baseball data (Division I, II, and III)

Description

This function allows the user to obtain batting or pitching statistics for any school affiliated with the NCAA at the division I, II, or III levels. The function acquires data from the NCAA's website (stats.ncaa.org) and returns a data frame.

Usage

ncaa_scrape(teamid, year, type = "batting")

Arguments

teamid

The numerical ID that the NCAA website uses to identify a team

year

The season for which data should be returned, in the form of "YYYY". Years currently available: 2013-2017.

type

A string indicating whether to return "batting" or "pitching" statistics

Examples

Run this code
# NOT RUN {
ncaa_scrape(255, 2013, "batting")
# }

Run the code above in your browser using DataLab