addClass: Add a Class to an Object

View source: R/attribute.R

addClassR Documentation

Add a Class to an Object

Description

Extend the class attribute by a given class name

Usage

addClass(x, className, first = TRUE, dbg = FALSE)

Arguments

x

R object

className

name of the class to be added to x

first

if TRUE (default) the className is prepended to the vector of existing class names, otherwise appended to the end of the vector

dbg

if TRUE (default), debug messages are shown.

Value

x with the class attributed extended by className (only if x did not yet inherit from className)


KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.