addClasses: A wrapper to add to the class attribute

View source: R/addClasses.R

addClassesR Documentation

A wrapper to add to the class attribute

Description

Adds classes to the class attribute of an object.

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

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

BBmisc documentation built on Nov. 6, 2026, 1:06 a.m.