Learn R Programming

BBmisc (version 1.13)

addClasses: A wrapper to add to the class attribute.

Description

A wrapper to add to the class attribute.

Usage

addClasses(x, classes)

Value

Changed object x.

Arguments

x

[any]
Your object.

classes

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

Examples

Run this code
x = list()
print(class(x))
x = addClasses(x, c("foo1", "foo2"))
print(class(x))

Run the code above in your browser using DataLab