Learn R Programming

nascaR.data (version 2.2.2)

find_driver: Find Driver Matches

Description

Find Driver Matches

Usage

find_driver(search_term, data = NULL, max_results = 5, interactive = TRUE)

Value

Character vector of matching driver names

Arguments

search_term

Character string to search for

data

Tibble containing NASCAR race data

max_results

Maximum number of matches to return

interactive

Logical. Is the session interactive?

Examples

Run this code
# Find exact match
find_driver("Christopher Bell")

# Find partial matches
find_driver("bell")

# Non-interactive mode for scripts
find_driver("kyle", interactive = FALSE)

Run the code above in your browser using DataLab