Skip to contents

Appends units for data.frame. For finer control, consider applying append_units.default to individual columns.

Usage

# S3 method for class 'data.frame'
append_units(x, ...)

Arguments

x

data.frame

...

named arguments passed to default method, un-named are columns to alter scope

Value

data.frame

Examples

library(magrittr)
file <- system.file(package = 'yamlet', 'extdata','quinidine.csv')
file %>% decorate %>% explicit_guide %>% append_units %>% decorations(Age, glyco)
#> - Age
#>  - label: baseline subject age (year)
#>  - units: year
#> - glyco
#>  - label: alpha-1 acid glycoprotein concentration (mg/dL)
#>  - units: mg/dL
file %>% decorate %>% explicit_guide %>% append_units(glyco) %>% decorations(Age, glyco)
#> - Age
#>  - label: baseline subject age
#>  - units: year
#> - glyco
#>  - label: alpha-1 acid glycoprotein concentration (mg/dL)
#>  - units: mg/dL