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: erinm.hodgess@gmail.com

	[[alternative HTML version deleted]]

