Learn R Programming

valdr (version 2.0.0)

.build_forceframe_df: Build a ForceFrame test data frame

Description

Internal helper to convert a list of ForceFrame 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_forceframe_df(records)

Value

A data.frame where each row corresponds to a ForceFrame test record. Internal function (not designed to be used directly by end users)

Arguments

records

A list of ForceFrame test records from the API (parsed JSON).

Details

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