powered by
A wrapper to add to the class attribute.
addClasses(x, classes)
Changed object x.
x
[any] Your object.
[character] Classes to add. Will be added in front (specialization).
character
x = list() print(class(x)) x = addClasses(x, c("foo1", "foo2")) print(class(x))
Run the code above in your browser using DataLab