Displaying 1 result from an estimated 1 matches for "s3vector".
Did you mean:
ovector
2005 Jan 14
1
S3/S4 classes performance comparison
...y differences between S3 and
S4 classes.
Here is the test:
---
### S3 CLASSES
S3content <- function(obj=NULL,add1=NULL,add2=NULL,type="",...){
out <- list(content=obj,add1=add2,add2=add2,type=type)
class(out) <- "S3Content"
return(out)
}
S3vector <- function(vec,...){
out <- S3content(obj=vec,type="Vector",...)
class(out) <- "S3Vector"
return(out)
}
### S4 classes
setClass("S4content",representation(content="ANY",add1="ANY",add2="ANY",type="character"...