Learn R Programming

yamlet (version 0.5.3)

factorize_codelist.data.frame: Coerce Data Frame Items with Codelists to Factor

Description

Coerces items in data.frame with codelist attribute to factor.

Usage

# S3 method for data.frame
factorize_codelist(x, ...)

Arguments

x

data.frame

...

passed to select to limit scope

Value

data.frame

See Also

Other factorize_codelist: factorize_codelist.character(), factorize_codelist.default(), factorize_codelist.factor(), factorize_codelist()

Examples

Run this code
# NOT RUN {
library(magrittr)
file <- system.file(package = 'yamlet', 'extdata','quinidine.csv')
x <- decorate(file)
x %>% explicit_guide %>% decorations(Age, Race, Heart:glyco)
x %>% explicit_guide %>% factorize_codelist %>% decorations(Age, Race, Heart:glyco)
x %>% explicit_guide %>% factorize_codelist(Heart:glyco) %>% decorations(Age, Race, Heart:glyco)
# }

Run the code above in your browser using DataLab