tidy_dlu: Tidy DLU form

View source: R/macro_utils.R

tidy_dluR Documentation

Tidy DLU form

Description

Separate visit, form and question into different columns. Variable names, NOT the values, of the dlu data will be converted to lower cases.

Usage

tidy_dlu(x, clean_names = TRUE)

Arguments

x

DLU data

clean_names

Conver variable name to lower case (default). See clean_names for details.

Details

The DLU file contains four columns:

  • shortcode: Variable name of the downloaded data.

  • visit/form/question: Contains visit, form and question. It is separated by a slash. This function will separate this column into 'visit', 'form' and 'question' column in the output dataset. The 'question' column is the unique variable name for a particular CRF form.

  • description: description of the variable, namely variable label. This is will be used by apply_macro_dict to create variable label.

  • type: type of the variable, it has IntegerData, Text, Date, Real and Category four categories. This will be used by apply_macro_dict to convert variables to corresponding type.

Value

A data.frame with 'visit/form/question' column separated into 'visit', 'form' and 'question' column.

See Also

apply_macro_dict read_data cttab report_missing clean_names


shug0131/cctu documentation built on Nov. 10, 2023, 12:03 p.m.