sr.class {ibdreg} | R Documentation |
Return or set the class attribute of an object, compatible for both R and S-PLUS. See details.
sr.class(x) sr.class(x) <- value
x |
Any object |
value |
character vector with the class(es) to assign to x |
Assigns the S3 class inheritence vector for S-PLUS objects by oldClass() and R objects by class()
character vector giving the S3 class(es) of x
# 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