Skip to contents

Reclass the columns of a dataset to match the variable types specified in the corresponding data dictionary

Usage

reclass_data(
  data,
  dict,
  format_date = "%Y-%m-%d",
  format_time = "%H:%M:%S",
  format_datetime = NULL
)

Arguments

data

A data frame reflecting a dataset to be shared

dict

A data frame reflecting the corresponding data dictionary

format_date

Expected format for date variables. Defaults to "%Y-%m-%d".

format_time

Expected format for date variables. Defaults to "%H:%M:%S".

format_datetime

Expected format for date variables. Defaults to NULL to use defaults in lubridate::as_datetime.

Value

The dataset with columns reclassed to match the data dictionary