[R] method names conflict.
Roger D. Peng
rpeng at jhsph.edu
Fri Nov 21 16:13:47 CET 2003
If you are using S4 classes/methods you can just do
setGeneric("union")
and that converts union() into an S4 generic function. Then you can use
setMethod() to create a union() method for your own objects. I think
the original union() in the base package because the default method.
-roger
Wolski wrote:
> Hi!
>
> I would like to give my objects functions like "subset", "union", et cetera and name it also in this way.
> But this functions names are already used in the base package and they are not generic.
> I am right in that if they would be generic then i still can use the neat names with my objects?
> I have the impression that there are more and more packages are going to be developed. How this is going to be handled in future?
>
> Eryk.
>
> Dipl. bio-chem. Eryk Witold Wolski @ MPI-MG Dep. Vertebrate Genomics
> Ihnestrasse 73 14195 Berlin 'v'
> tel: 0049-30-84131285 / \
> mail: wolski at molgen.mpg.de ---W-W----
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
More information about the R-help
mailing list