Skip to contents

Deprecated. Use [load_leaderboard()] instead, which serves completed tournaments from pre-built hosted files rather than one live request per event.

Usage

load_pga_leaderboards(years, tournaments = NULL, tour = "pga", dir = NULL)

Arguments

years

Numeric vector. Year(s) to load (e.g., 2025 or 2023:2025).

tournaments

Character vector. Optional tournament event IDs or names to filter. If NULL, loads all tournaments.

tour

Character. Tour type, default "pga".

dir

Character. Optional directory to save CSV files.

Value

A tibble with leaderboard data.

Examples

# \donttest{
load_pga_leaderboards(2025, "Masters Tournament")
#> Warning: `load_pga_leaderboards()` was deprecated in golfastr 0.2.0.
#> ℹ Please use `load_leaderboard()` instead.
#> # A tibble: 95 × 6
#>    position player_id player_name       total_score score_to_par  year
#>       <int> <chr>     <chr>                   <int> <chr>        <dbl>
#>  1        1 3470      Rory McIlroy              277 -11           2025
#>  2        2 569       Justin Rose               277 -11           2025
#>  3        3 5579      Patrick Reed              279 -9            2025
#>  4        4 9478      Scottie Scheffler         280 -8            2025
#>  5        5 11382     Sungjae Im                281 -7            2025
#>  6        6 10046     Bryson DeChambeau         281 -7            2025
#>  7        7 4375972   Ludvig Åberg              282 -6            2025
#>  8        8 686       Zach Johnson              283 -5            2025
#>  9        9 10140     Xander Schauffele         283 -5            2025
#> 10       10 1680      Jason Day                 283 -5            2025
#> # ℹ 85 more rows
# }