There is nothing to stop you using these names, you just need
to be aware that you would be hiding the base definitions. Though
these could always be accessed using the double colon operator,
e.g. base::subset, you might indeed get very unexpected results
if some function called subset() expecting the default but found
yours instead.
I rather like the behaviour of S-Plus here - it warns you when you
are masking something. But in R we are all grown-ups and expected
to fend for ourselves.
I frequently type a name at a blank prompt to check whether it
already exists before assigning to it (there are much more beautiful
ways, but this is quickest).
I wouldn't worry overmuch about the explosion in the number of
packages and their multiple use of same names. There is seldom
a need to load more than a couple of packages at any one time.
Besides, package writers tend to use peculiar names for internal
functions precisely to reduce the potential problem.
> -----Original Message-----
> From: Wolski [mailto:wolski at molgen.mpg.de]
> Sent: 21 November 2003 15:03
> To: R-help at stat.math.ethz.ch
> Subject: [R] method names conflict.
>
>
> Security Warning:
> If you are not sure an attachment is safe to open please contact
> Andy on x234. There are 0 attachments with this message.
> ________________________________________________________________
>
> 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
>
Simon Fear
Senior Statistician
Syne qua non Ltd
Tel: +44 (0) 1379 644449
Fax: +44 (0) 1379 644445
email: Simon.Fear at synequanon.com
web: http://www.synequanon.com
Number of attachments included with this message: 0
This message (and any associated files) is confidential and\...{{dropped}}