Convenience function to add a class

add_class(x, cl)

Arguments

x

Object

cl

Vector of class labels to add

Examples

foo <- "some text" %>% add_class("text") foo <- "some text" %>% add_class(c("text", "another class"))