[Rd] surprising behaviour of names<-

Tony Plate tplate at acm.org
Fri Mar 13 20:28:05 CET 2009


Wacek Kusnierczyk wrote:
> [snip]
> i just can't get it why the manual does not manifestly explain what
> 'names<-' does, and leaves you doing the guesswork you suggest.
>
>   
I'm having trouble understanding the point of this discussion.  Someone 
is calling a replacement function in a way that it's not meant to be 
used, and is them complaining about it not doing what he thinks it 
should, or about the documentation not describing what happens when one 
does that?

Is there anything incorrect or missing in the help page for normal usage 
of the replacement function for 'names'? (i.e., when used in an 
expression like 'names(x) <- ...')

R does give one the ability to use its facilities in non-standard ways.  
However, I don't see much value in the help page for 'gun' attempting to 
describe the ways in which the bones in your foot will be shattered 
should you choose to point the gun at your foot and pull the trigger.  
Reminds me of the story of the guy in New York, who after injuring his 
back in refrigerator-carrying race, sued the manufacturer of the 
refrigerator for not having a warning label against that sort of use.

-- Tony Plate



More information about the R-devel mailing list