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

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Tue, 11 Nov 2008 15:13:46 -0500

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.


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 - 20:16:25 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 Wed 12 Nov 2008 - 21:30:24 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