get_driver_info: Get Driver Info with Smart Matching

View source: R/find.R

get_driver_infoR Documentation

Get Driver Info with Smart Matching

Description

Search for a driver by name and return career statistics. Supports partial names, typos, and case-insensitive input via the built-in fuzzy matching engine.

Usage

get_driver_info(driver, series = "all", type = "summary", interactive = TRUE)

Arguments

driver

Character string of the driver name to search for. Supports partial names and common misspellings (e.g., "earnhart" finds Earnhardt).

series

Character string ("cup", "nxs", "truck", "all") or a pre-loaded data frame. Default is "all".

type

Character string specifying the return format:

"summary"

Career totals grouped by series (Seasons, Career Races, Wins, Best Finish, Avg Finish, Laps Raced, Laps Led).

"season"

Season-by-season breakdown (Races, Wins, Best Finish, Avg Finish, Laps Raced, Laps Led).

"all"

Complete race-by-race results.

interactive

Logical. When TRUE (default) and the R session is interactive, prompts the user to select from multiple matches. When FALSE, silently uses the first match.

Value

A tibble of driver statistics (format depends on type), or invisible(NULL) if no match is found.

See Also

get_team_info(), get_manufacturer_info(), load_series(), series_data

Examples


# Career summary across all series
get_driver_info("Christopher Bell")

# Season-by-season Cup data
get_driver_info(
  "Christopher Bell",
  series = "cup",
  type = "season"
)


nascaR.data documentation built on Feb. 14, 2026, 5:07 p.m.