From christophe.genolini at free.fr  Mon Feb 25 15:39:17 2008
From: christophe.genolini at free.fr (christophe.genolini at free.fr)
Date: Mon, 25 Feb 2008 15:39:17 +0100
Subject: [Rd] S4 : declaration of inheritance
In-Reply-To: <47C2D0B7.7080801@ebi.ac.uk>
References: <mailman.25.1203937206.11666.r-devel@r-project.org>
	<1203948977.47c2cdb18dc3c@imp.free.fr> <47C2D0B7.7080801@ebi.ac.uk>
Message-ID: <1203950357.47c2d3152cf86@imp.free.fr>

Sorry, I make a mistake... I meant :
what the difference between

setClass("myClass",
   representation("fatherClass",x="numeric")
   ....

or

setClass("myClass",
   representation(x="numeric"),
   contains="fatherClass"
   ....



> setClass("myClass",
>    representation(x="numeric"),
>    contains="fartherClass")
>
> seems more logical to me in sense of syntax (pay attention to setClass
> instead of setMethod and contains instead of containt), but both work
> apparently.
>
> Oleg
>
> christophe.genolini at free.fr wrote:
> > Hi the list,
> >
> > There is two way to declare a new object with inheritence : one can do
> >
> > setMethod("myClass",
> >   representation("fatherClass",x="numeric")
> >   ....
> >
> > or
> >
> > setMethod("myClass",
> >   representation(x="numeric"),
> >   containt="fatherClass"
> >   ....
> >
> > Is there any difference ? What is the usal way ?
> >
> > Christophe
> >
> > ______________________________________________
> > R-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
>
> --
> Dr Oleg Sklyar * EBI-EMBL, Cambridge CB10 1SD, UK * +44-1223-494466
>



[Rd] S4 : declaration of inheritance
christophe.genolini at free.fr