setclass: Set the class of an object (convenience function for...

View source: R/utility_functions.R

setclassR Documentation

Set the class of an object (convenience function for setattr(obj, "class", CLASS)); can add instead of replace

Description

Sets the class of an object in place to cl by replacing or adding

Usage

setclass(obj, cl, add = FALSE, add.place = "first")

Arguments

obj

and object for which to set class

cl

class to set

add

if TRUE, adds cl to the classes of the obj; otherwise replaces the class information

add.place

"first" or "last"; adds cl to the front or to the back of the obj's class vector

Author(s)

Joonas Miettinen


popEpi documentation built on Aug. 23, 2023, 5:08 p.m.