Coerces items in data.frame with codelist attribute to 'classified': a factor with a codelist attribute.
Usage
# S3 method for class 'data.frame'
classified(x, ..., exclude = NA, ordered = is.ordered(x), nmax = NA)See also
Other classified:
[.classified(),
[<-.classified(),
[[.classified(),
[[<-.classified(),
as.integer.classified(),
c.classified(),
classified(),
classified.classified(),
classified.default(),
classified.dvec(),
classified.factor(),
codify.default(),
desolve.classified(),
unclassified(),
unclassified.classified(),
unclassified.data.frame()
Other interface:
canonical.decorated(),
decorate.character(),
decorate.data.frame(),
desolve.decorated(),
enscript.decorated(),
ggplot.decorated(),
io_csv.character(),
io_csv.data.frame(),
io_res.character(),
io_res.decorated(),
io_table.character(),
io_table.data.frame(),
io_yamlet.character(),
io_yamlet.data.frame(),
is_parseable.default(),
mimic.default(),
modify.default(),
promote.list(),
read_yamlet(),
resolve.decorated(),
selected.default(),
write_yamlet()
Examples
library(magrittr)
file <- system.file(package = 'yamlet', 'extdata','quinidine.csv')
x <- decorate(file)
x %>% explicit_guide %>% decorations(Age, Race, Heart:glyco)
#> - Age
#> - label: baseline subject age
#> - units: year
#> - Race
#> - label: subject race
#> - codelist: Caucasian, Latin, Black
#> - Heart
#> - label: congestive heart failure
#> - codelist: No/Mild, Moderate, Severe
#> - Creatinine
#> - label: creatinine clearance
#> - codelist
#> - < 50 mg/min: < 50
#> - '>= 50 mg/min': '>= 50'
#> - glyco
#> - label: alpha-1 acid glycoprotein concentration
#> - units: mg/dL
x %>% explicit_guide %>% classified %>% decorations(Age, Race, Heart:glyco)
#> - Age
#> - label: baseline subject age
#> - units: year
#> - Race
#> - label: subject race
#> - codelist: Caucasian, Latin, Black
#> - Heart
#> - label: congestive heart failure
#> - codelist: No/Mild, Moderate, Severe
#> - Creatinine
#> - label: creatinine clearance
#> - codelist
#> - < 50: < 50 mg/min
#> - '>= 50': '>= 50 mg/min'
#> - glyco
#> - label: alpha-1 acid glycoprotein concentration
#> - units: mg/dL
x %>% explicit_guide %>% classified(Heart:glyco) %>% decorations(Age, Race, Heart:glyco)
#> - Age
#> - label: baseline subject age
#> - units: year
#> - Race
#> - label: subject race
#> - codelist: Caucasian, Latin, Black
#> - Heart
#> - label: congestive heart failure
#> - codelist: No/Mild, Moderate, Severe
#> - Creatinine
#> - label: creatinine clearance
#> - codelist
#> - < 50: < 50 mg/min
#> - '>= 50': '>= 50 mg/min'
#> - glyco
#> - label: alpha-1 acid glycoprotein concentration
#> - units: mg/dL