Skip to contents

Sets the class attribute of an object and returns the modified object.

Usage

setClasses(x, classes)

Arguments

x

[any]
Your object.

classes

[character]
New classes.

Value

Changed object x.

Examples

setClasses(list(), c("foo1", "foo2"))
#> list()
#> attr(,"class")
#> [1] "foo1" "foo2"