Skip to contents

Get NCAA Baseball Game Logs

Usage

ncaa_game_logs(player_id, year, type = "batting", span = "game", ...)

Arguments

player_id

A player's unique id. Can be found using the get_ncaa_baseball_roster function.

year

The year of interest.

type

The kind of statistics you want to return. Current options are 'batting' or 'pitching'.

span

The span of time; can either be 'game' for game logs in a season, or 'career' which returns seasonal stats for a player's career.

...

Additional arguments passed to an underlying function like httr.

Value

A data frame containing player and school information as well as game by game statistics

col_nametypes
player_idnumeric
player_namecharacter
Datecharacter
Opponentcharacter
Resultcharacter
Appnumeric
Gnumeric
GSnumeric
IPnumeric
CGnumeric
Hnumeric
Rnumeric
ERnumeric
BBnumeric
SOnumeric
SHOnumeric
BFnumeric
P-OABnumeric
2B-Anumeric
3B-Anumeric
Bknumeric
HR-Anumeric
WPnumeric
HBnumeric
IBBnumeric
Inh Runnumeric
Inh Run Scorenumeric
SHAnumeric
SFAnumeric
Pitchesnumeric
GOnumeric
FOnumeric
Wnumeric
Lnumeric
SVnumeric
OrdAppearednumeric
KLnumeric
pickoffscharacter

Examples

# \donttest{
  try(ncaa_game_logs(player_id = 2649785, year = 2023, type = "pitching", span = "game"))
#> 2026-06-08 11:09:39.394104: Invalid arguments provided
#> data frame with 0 columns and 0 rows
  try(ncaa_game_logs(player_id = 2477974, year = 2023, type = "pitching", span = "career"))
#> 2026-06-08 11:09:44.595033: Invalid arguments provided
#> data frame with 0 columns and 0 rows
  try(ncaa_game_logs(player_id = 2680961, year = 2023, type = "batting", span = "game"))
#> 2026-06-08 11:09:52.820155: Invalid arguments provided
#> data frame with 0 columns and 0 rows
  try(ncaa_game_logs(player_id = 2486588, year = 2023, type = "batting", span = "career"))
#> 2026-06-08 11:09:57.999532: Invalid arguments provided
#> data frame with 0 columns and 0 rows
# }