reclass | R Documentation |
Reclass columns of a data frame to match classes specified in a metadata dictionary
reclass(
x,
dict,
use_factors = FALSE,
value_labs = TRUE,
header_labs = FALSE,
times_chron = TRUE,
fn_dates = parse_date,
fn_dates_args = list(orders = c("Ymd", "dmY")),
fn_datetimes = lubridate::parse_date_time,
fn_datetimes_args = list(orders = c("Ymd HMS", "Ymd HM"))
)
x |
A data frame representing a REDCap form |
dict |
A metadata dictionary |
use_factors |
Logical indicating whether categorical REDCap variables
(radio, dropdown, yesno, checkbox) should be returned as factors. Factor
levels can either be raw values (e.g. "0"/"1") or labels (e.g. "No"/"Yes")
depending on arguments |
value_labs |
Logical indicating whether to return value labels ( |
header_labs |
Logical indicating whether to export column names as
labels ( |
times_chron |
Logical indicating whether to reclass time variables using
chron::times ( |
fn_dates |
Function to parse REDCap date variables. Defaults to
|
fn_dates_args |
List of arguments to pass to |
fn_datetimes |
Function to parse REDCap datetime variables. Defaults to
|
fn_datetimes_args |
List of arguments to pass to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.