ys_get_unit: Get unit

View source: R/ys-get.R

ys_get_unitR Documentation

Get unit

Description

Forms unit for a column (ycol method) or columns (yspec method). Use purrr::map or purrr::map_chr to simply extract the unit field.

Usage

ys_get_unit(x, parens = FALSE, default = "", ...)

Arguments

x

ycol or yspec object

parens

if TRUE, then parens will be added around any unit with one or more character

default

passed to unit

...

passed to unit methods

See Also

ys_get_short, ys_get_label, ys_get_short_unit

Examples

spec <- ys_help$spec()

ys_get_unit(spec)

ys_get_unit(spec$WT)

## Not run: 
purrr:::map(spec,"unit")

## End(Not run)

metrumresearchgroup/yspec documentation built on Dec. 22, 2024, 1:37 a.m.