Learn R Programming

fame (version 1.13)

stripClass: Remove part of a class attribute

Description

An R object may have a class attribute that is a character vector giving the names of classes it inherits from. stripClass strips the class classString from that character vector. stripTis(x) is shorthand for stripClass(x, "tis").

Usage

stripClass(x, classString)
stripTis(x)

Arguments

x
an object whose class character vector may or may not include classString
classString
name of class to remove from the inheritance chain

Value

  • An object like x, but whose class attribute does not include classString. If the class attribute less classString is empty, unclass(x) is returned.

See Also

class