Skip to contents

This function filters a data frame based on a specified schema, which defines the columns to keep. It also handles special case where data needs to be reshaped to long format before filtering.

Usage

extract_schema_columns(data, schema_name)

Arguments

data

An accident data object.

schema_name

A character string specifying the schema to use for filtering.

Value

A data frame containing only the columns defined in the schema, or NULL.

Examples

if (FALSE) { # \dontrun{
person_info <- extract_schema_columns(accident_data, "person_info")
} # }