addClasses {BBmisc}R Documentation

A wrapper to add to the class attribute.

Description

A wrapper to add to the class attribute.

Usage

addClasses(x, classes)

Arguments

x

[any]
Your object.

classes

[character]
Classes to add. Will be added in front (specialization).

Value

Changed object x.

Examples

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

[Package BBmisc version 1.7 Index]