add_class: Add class to object whilst keeping the old classes

View source: R/add_class.R

add_classR 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")

dynutils documentation built on Oct. 11, 2022, 5:07 p.m.