Dear R People:
I am experimenting with S4 classes and methods but am having trouble with
setting up a class.
Here is an example:
> buzz <- setClass("buzz",slots=c(x="matrix"),
+ validity <- function(object) {
+ if(is.matrix(object)==FALSE)stop("Input must be a matrix")
+ TRUE
+ })
Error in setClass("buzz", slots = c(x = "matrix"), validity <-
function(object) { :
Argument "representation" cannot be used if argument "slots" is supplied
>
I know that there is something simple that I'm just not seeing.
This is R-3.0.1 for Windows.
Thanks for any help.
Sincerely,
Erin
--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: [email protected]
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.