Learn R Programming

popEpi (version 0.2.1)

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

Description

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

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