R: A wrapper to add to the class attribute.

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

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

[Package BBmisc version 1.11 Index]