Re: [Rd] Darwinian software development and the library function

2010-02-15 Thread Spencer Graves
Hi, Charlotte: I'm with Henrik: I don't know the global consequences of "print = function (...) base::print (...)", but I wouldn't do it. Writing "print.foo (x, ...)" may violate your sense of aesthetics, but I avoid it. I've done things like that in the past, then changed th

Re: [Rd] Darwinian software development and the library function

2010-02-13 Thread Henrik Bengtsson
Hi. Here are some guidelines that I find useful: - Avoid changing the arguments of generic functions provided by the default R packages, especially the ones in base. Just, accept those arguments. If there are extra arguments you don't like, you can always add '...' to your method and they will

Re: [Rd] Darwinian software development and the library function

2010-02-12 Thread Charlotte Maia
Hi Spencer, Sorry, I wasn't very clear in my initial post. The function print.foo (myfoo, ...) won't pass R check (unless one overwrites print first). One has to write print.foo (x, ...), which in my personal opinion, can be problematic. In my oosp package, I have overwritten print (along with a

Re: [Rd] Darwinian software development and the library function

2010-02-12 Thread spencerg
Hi, Charlotte: I'm not sure what you mean. If you mean writing something like "print.foo (myfoo, ...)", this is relatively benign I suppose, but I avoid it where feasible. On multiple occasions, I've pushed collaborators and even maintainers of other packages to change this or allow

[Rd] Darwinian software development and the library function

2010-02-11 Thread Charlotte Maia
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 o