list_records_to_df: Convert a list of records to a data.frame
Description
Converts a list where each element represents a record (row) into a
data.frame. Missing fields are filled with NA.
Usage
list_records_to_df(x)
Value
A data.frame with one row per record and columns corresponding to the
union of all field names.
Arguments
x
A list of records. Each record should be a named list or similar structure.
Records may have different sets of fields.
Details
List-valued fields are flattened by collapsing their contents into a single
character value. This guarantees that the returned data frame contains no
list columns, but nested structure is not preserved.
This function is intended for row-oriented data structures, such as JSON
arrays of objects.