fetch_player_stats {nrlR}R Documentation

Fetch Player Stats from Multiple Rugby League Sources

Description

Unified wrapper to fetch player stats from either Champion Data MC API (NRL/NRLW/State of Origin) or Rugby League Project web scraping.

Usage

fetch_player_stats(
  season = NULL,
  league = c("nrl", "super_league", "championship", "league_one", "womens_super_league",
    "qld_cup", "nsw_cup"),
  round = NULL,
  comp = NULL,
  source = c("championdata", "rugbyproject")
)

Arguments

season

Integer scalar. Season year (rugbyproject only).

league

Character scalar. League name (rugbyproject only).

round

Integer scalar or NULL. Round number filter (both sources).

comp

Integer. Competition ID (championdata only).

source

Character scalar. One of "championdata" or "rugbyproject". Default is "championdata".

Details

For 'source = "championdata"', provide 'comp' (competition ID). 'round' is optional. For 'source = "rugbyproject"', provide 'season', 'league', and optionally 'round'.

Value

A tibble of player stats joined with fixture info.


[Package nrlR version 0.1.0 Index]