set_class: Modify object class attriutes

View source: R/set_class.R

set_classR Documentation

Modify object class attriutes

Description

Set class of an object. Optionally append or prepend to exiting class attributes. 'add_class' is short for 'set_class(x, class, "prepend")'. 'strip_class' removes matching class strings from the class attribute vector.

Usage

set_class(x, class, add = c("overwrite", "prepend", "append"))

add_class(x, class)

strip_class(x, class)

Arguments

x

Object to assign new class to.

class

Class value to add/strip.

Value

Object x as class value.


thackl/thacklr documentation built on Oct. 16, 2023, 9:15 p.m.