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")))
Run the code above in your browser using DataLab