Learn R Programming

valdr (version 2.0.0)

.build_nordbord_df: Build a NordBord test data frame

Description

Internal helper to convert a list of NordBord test records into a tidy data.frame. For character columns, NULL values are replaced with an empty string ("") to ensure consistent downstream handling.

Usage

.build_nordbord_df(records)

Value

A data.frame with one row per NordBord test record. Internal function (not designed to be used directly by end users)

Arguments

records

A list of NordBord test records from the API.

Details

Special handling is applied for the identifier column: some NordBord API endpoints return this as profileId, while others return it as athleteId. This function will populate the athleteId column by taking the first non-empty value from athleteId or profileId, in that order.