add_class: Add class to object whilst keeping the old classes

Description Usage Arguments Examples

View source: R/add_class.R

Description

Add class to object whilst keeping the old classes

Usage

1

Arguments

x

a R object

class

A character vector naming classes

Examples

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

dynutils documentation built on March 22, 2021, 5:06 p.m.