Learn R Programming

NBDCtools (version 1.0.2)

transf_factor: Convert categorical columns to factor

Description

Based on the specifications in the data dictionary, transforms all categorical columns to factor.

Usage

transf_factor(data, study, release = "latest")

Value

A tibble with the transformed data.

Arguments

data

tibble. The data to be transformed. Columns are expected to be in the data dictionary. If not, they will be skipped.

study

character. NBDC study (One of "abcd" or "hbcd".

release

character. Release version (Default: "latest").

Examples

Run this code
if (FALSE) {
transf_factor(data, study = "abcd")
}

Run the code above in your browser using DataLab