sr.class {ibdreg}R Documentation

Return or set the class attribute of an object, compatible for both R and S-PLUS

Description

Return or set the class attribute of an object, compatible for both R and S-PLUS. See details.

Usage

sr.class(x)
sr.class(x) <- value

Arguments

x Any object
value character vector with the class(es) to assign to x

Details

Assigns the S3 class inheritence vector for S-PLUS objects by oldClass() and R objects by class()

Value

character vector giving the S3 class(es) of x

Examples

# create a simple object
myobj <- "This is an object"
sr.class(myobj) <- c("temp.class", "character")

# observe the characteristics of myobj
myobj
sr.class(myobj)  # returns: "temp.class" "character"
inherits(myobj, "character") # returns TRUE

[Package ibdreg version 0.1.2 Index]