dot-bref_table: Internal: parse a Basketball-Reference HTML table by id using...

.bref_tableR Documentation

Internal: parse a Basketball-Reference HTML table by id using data-stat keys

Description

Un-comments the page (so comment-hidden tables are reachable), selects the table (by id, or the first table when table_id is NULL), drops mid-table header-repeat rows, and builds a data.frame whose columns are the cells' data-stat attributes.

Usage

.bref_table(html, table_id = NULL)

Arguments

html

Raw page HTML (character).

table_id

Optional table id (e.g. "per_game_stats"); NULL = first table.

Value

A data.frame (character columns), or an empty data.frame if not found.


hoopR documentation built on Aug. 25, 2026, 9:07 a.m.