[R] Variable passed to function not used in function in select=... in subset
Duncan Murdoch
murdoch at stats.uwo.ca
Tue Nov 11 21:13:46 CET 2008
On 11/11/2008 2:56 PM, Bert Gunter wrote:
> Ummm... as today is still Armistice day (in my time zone, anyway), maybe we
> should call a truce and end this flame war...
I haven't seen very many flames -- there have been disagreements, but
generally it's been quite civil. Certainly I don't think Berwin flamed me.
If we were to add in a warning about partial name matching, it would
have to be accompanied by some way to deal with common uses like the one
Berwin mentioned. (There are at least 100 uses of seq(..., length=...)
in the core & recommended packages. I wouldn't want to fix all of
those.) But it could still be useful, in the same way the checks for
using TRUE and FALSE instead of T and F are useful.
Duncan Murdoch
>
> Cheers,
> Bert
>
>
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
> Behalf Of Berwin A Turlach
> Sent: Tuesday, November 11, 2008 9:31 AM
> To: Duncan Murdoch
> Cc: R help
> Subject: Re: [R] Variable passed to function not used in function in
> select=... in subset
>
> 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.
>
> Cheers,
>
> Berwin
>
> ______________________________________________
> 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.
>
> ______________________________________________
> 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.
More information about the R-help
mailing list