[R] Variable passed to function not used in function in select=... in subset

Wacek Kusnierczyk Waclaw.Marcin.Kusnierczyk at idi.ntnu.no
Tue Nov 11 13:54:11 CET 2008


Berwin A Turlach wrote:
> On Tue, 11 Nov 2008 09:49:31 +0100
> Wacek Kusnierczyk <Waclaw.Marcin.Kusnierczyk at idi.ntnu.no> wrote:
>
>   
>> (for whatever reason a user may choose to have a column named '-b')
>>     
>
> For whatever reason, people also jump from bridges.  Does that mean
> all bridges have an inherently flawed design and should be abolished?
>
> Wait, then we would only have level crossing and some people, for
> whatever reason, think it is a good idea to race trains to level
> crossings.  Gee, we better abolish them too since they are such a bad
> design.  
>   
i agree that the case of -b is extreme, but your response is still
unfair to the original problem.  people that jump from bridges usually
do that intentionally.  the intention of the user who complained about
his code (below) was certainly not to jump off a bridge, but to walk
over it.  and yet he's fallen into cold water.  a bridge which makes you
fall when you want to walk and not to jump has flawed design and is a
good candidate for abolishing.

testfunc = function(data, group) print(names(subset(data, select=group)))

vQ



More information about the R-help mailing list