Form a short name

short(x, ...)

# S3 method for class 'ycol'
short(
  x,
  default = "col",
  short_max = getOption("yspec.short.max", NULL),
  title_case = getOption("yspec.short.title", FALSE),
  ...
)

# S3 method for class 'yspec'
short(x, default = "short", .aslist = TRUE, ...)

Arguments

x

a yspec or ycol object

...

passed to methods

default

character field name to use when the short field is not found

short_max

if short is found, but contains more than short_max characters, col will be used

title_case

short will be converted with tools::toTitleCase if it is found

.aslist

if `TRUE`a named list is returned; otherwise, a named character vector