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

From: Peter Dalgaard <P.Dalgaard_at_biostat.ku.dk>
Date: Tue, 11 Nov 2008 19:01:20 +0100

Berwin A Turlach wrote:
> G'day Duncan,
>
> On Tue, 11 Nov 2008 09:37:57 -0500
> Duncan Murdoch <murdoch_at_stats.uwo.ca> wrote:
>

>> I think this tension is a fundamental part of the character of S and
>> R. But it is also fundamental to R that there are QC tests that apply
>> to code in packages:  so writing new tests that detect dangerous
>> usage (e.g. to disallow partial name matching) would be another way
>> to improve reliability.  [...]

>
> Please not. :)
> After years of using of R, it is now second nature to me to type (yes,
> I always spell out "from" and "to")
> seq(from=xx, to=yy, length=zz)
> and I never understood why the full name of that argument had to be
> length.out. I would hate to see lots of warning messages because I am
> using partial matching.

I think the story is this:

At some point in time, in a galaxy not too far away, and using one of the R-like languages, calling the argument "length" gave you trouble calling length(from) inside the function ("attempt to call non-function" or some such error). Later, this issue was fixed so that function calls would look for functions only, but by then, the name couldn't be changed since some people had been writing it out in full.

(There are a couple of other cases, one of them involving an argument ending in a ".", but I forgot what they are. I don't think there was ever an along() function, so "along.with" escapes me.)

-- 
   O__  ---- Peter Dalgaard             Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard_at_biostat.ku.dk)              FAX: (+45) 35327907

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 11 Nov 2008 - 18:06:01 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 11 Nov 2008 - 19:30:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive