Generates a JSON representation of a dataset’s structure. Each column includes class, number of unique values, and optionally a truncated list of values unless excluded by type or pattern. All columns are retained in the output.
json_data_structure(
dataset,
dataset_name = NULL,
n_first = 100,
cols_exclude = "(bsn|id$|num[mb]er)",
output_file = NULL
)
data.frame Input dataset.
Optional name of dataset, used in JSON root.
Maximum number of unique values to include.
Regular expression of column names to exclude values from.
Output path for JSON file.
Invisibly returns the structured list written to JSON.