Skip to contents

shrthnd_tags() provides a character vector the same length as x with the shorthand tags, or NA if that value has no tag. shrthnd_unique_tags() is a convenience wrapper for unique(shrthnd_tags(x)), but can also be called on a shrthnd_list() object.

Usage

shrthnd_tags(x)

shrthnd_unique_tags(x)

Arguments

x

A shrthnd_num() vector

Value

A character vector

Examples

x <- c("12", "34.567", "[c]", "NA", "56.78[e]", "78.9", "90.123[e]")
sh_x <- shrthnd_num(x, c("[c]", "[e]"))
shrthnd_tags(sh_x)
#> [1] NA    NA    "[c]" NA    "[e]" NA    "[e]"
shrthnd_unique_tags(sh_x)
#> [1] "[c]" "[e]"