R: Add class to object whilst keeping the old classes

add_class {dynutils} | R Documentation

## Add class to object whilst keeping the old classes

### Description

Add class to object whilst keeping the old classes

### Usage

    add_class(x, class)

### Arguments

`x` | a R object
`class` | A character vector naming classes

### Examples

    library(purrr)
    l <- list(important_number = 42) %>% add_class("my_list")

[Package dynutils version 1.0.4 Index]