Hi R People:
I have a question about setClass please. I'm working thru "R
Programming for Bioinformatics".
Actually, I was wondering if there is such a thing as an updateClass,
in order to change a "contains" option, please?
that is, if I had
setClass("dog",
representation(name="character",paws="numeric",tail="character"))
Fair enough.
Later I want to have a class called "pets".
setClass("pets",representation(name="character",total="numeric"))
I want dog to be a subclass of pets. Do I put in the setClass command
as it stands with the additional contains="pets", or is there an
update form to use, please?
Hope this makes sense.
Thanks,
Sincerely,
Erin
--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodgess at gmail.com
Erin Hodgess wrote:> Hi R People: > > I have a question about setClass please. I'm working thru "R > Programming for Bioinformatics". > > Actually, I was wondering if there is such a thing as an updateClass, > in order to change a "contains" option, please? > > that is, if I had > > setClass("dog", > representation(name="character",paws="numeric",tail="character")) > > > Fair enough. > > Later I want to have a class called "pets". > > setClass("pets",representation(name="character",total="numeric")) > > I want dog to be a subclass of pets. Do I put in the setClass command > as it stands with the additional contains="pets", or is there an > update form to use, please?No, you cannot update a class definition. Best, Uwe> Hope this makes sense. > > Thanks, > Sincerely, > Erin > >