add_class | R Documentation |
Adds a class to an object.
add_class(x, new_class, location = "first")
x |
the object to add a class to |
new_class |
the new class or classes |
location |
should the new class come before the old classes or after them? |
the object, but with new classes
a <- "Hello world!" class(a) b <- add_class(a, "awesome_text") class(b) # You can also add multiple classes to an object at once! c <- add_class(a, c("class1", "class2")) class(c)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.