in_labels | R Documentation |
Match codes based on label
in_labels(
x,
labels,
codelist = attr(x, "codelist"),
locale = cl_locale(codelist)
)
x |
vector with codes. Should be of the same type as the codes in the codelist. |
labels |
vector with labels. |
codelist |
a |
locale |
use the codes from the given locale. Should be character vector of length 1. |
A logical vector of the same length as x
indicating for each value if
the code has a label present in labels
.
data(objectcodes)
data(objectsales)
objectsales$product <- code(objectsales$product, objectcodes)
in_labels(objectsales$product, c("Electric Drill", "Toys"))
subset(objectsales, in_labels(product, c("Electric Drill", "Hammer")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.