Skip to contents

Makes title for decorated vectors. If option with_title is TRUE and x has a 'units' attribute, it adds the title attribute. See also drop_title for coordinated use.

Usage

# S3 method for class 'dvec'
make_title(x, ..., with_title = getOption("yamlet_with_title", TRUE))

Arguments

x

dvec

...

ignored arguments

with_title

whether to drop title

Value

dvec

Examples

library(magrittr)
1 %>% 
as_dvec(label = 'length', guide = 'mm') %>%
resolve
#> [1] 1
#> attr(,"label")
#> [1] "length"
#> attr(,"units")
#> [1] "mm"
#> attr(,"title")
#> [1] "length (mm)"