[BioC] equivalent of $this

Kasper Daniel Hansen khansen at stat.Berkeley.EDU
Fri Sep 9 06:32:16 CEST 2005


If it is a redefinition of an existing method it will (or rather it  
has to) use the arguments of the existing general method. If you make  
you own method, you choose what to call the arguments, but standard  
says to call it object if it is a method only accepting an object (or  
perhaps on object and a value) - at least when you use S4 classes.

Kasper



M, TEXTORIS Julien wrote:

> Hi,
>
> when programming with R and objects, when you describe a new class or
> method, does $this or an equivalent exists ? Sometimes, there is :
>
> function(Object) (So Object is something equivalent to $this ?)
> function(.Object) (and .Object too ?)
> function(x,i,j,...) (and in this case x was equivalent to $this)
>
>
> I saw the last case in a redifinition of an existing method for the  
> new
> object created by myclass, and if i understand well, if a generic
> function was first described with function(x,i,j,...) one will  
> reutilize
> it, instead, if it's a new function, one will use Object or  
> either .Object ?
>
> Is that true ?
>
> thanks
>
> Julien
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
>



More information about the Bioconductor mailing list