[Rd] Darwinian software development and the library function
Charlotte Maia
maiagx at gmail.com
Fri Feb 12 04:59:58 CET 2010
Hi all,
Legend has it, that polite R programmers don't overwrite, say, the
print function.
However, this seems quite un-Darwinian to me (especially given that I
don't want to call all my arguments x and y).
I might want a function print.foo (myfoo, ...).
So I decided to be very impolite (in one of my packages) and overwrite
a few standard generics.
Plus, to the best of my knowledge it doesn't interfere with normal use (yay...).
This brings us to the library function.
Which by default gives a whole lot of warnings loading my package (and
any other package that does something similar), scaring off polite R
programmers and perhaps some mainstream R users.
I'm starting to think that the default for library, should be
warn.conflicts=FALSE.
However, just reading the documentation, I noticed a reference to
something called .conflicts.OK.
Not sure what that does, however if it does what it sounds like, then
it largely fixes the problem.
The biggest issue though, is whether or not one should be impolite
(i.e. Darwinian) and overwrite print etc in the first place...?
I'm inclined to go in favour of overwriting the functions.
However, it has the potential to introduce some technical problems.
Other's opinions appreciated.
kind regards
--
Charlotte Maia
http://sites.google.com/site/maiagx
More information about the R-devel
mailing list