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
See also
Other labels:
alias.data.frame(),
append_units(),
append_units.data.frame(),
append_units.default(),
drop_title(),
drop_title.decorated(),
drop_title.default(),
drop_title.dvec(),
make_title(),
make_title.decorated(),
make_title.default(),
sub_units()
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)"