Re: [Rd] Bounty on Error Checking

2013-01-04 Thread Duncan Murdoch
On 04/01/2013 10:38 AM, Matthew Dowle wrote: On 04.01.2013 15:22, Duncan Murdoch wrote: > On 04/01/2013 10:15 AM, Matthew Dowle wrote: >> On 04.01.2013 14:56, Duncan Murdoch wrote: >> > On 04/01/2013 9:51 AM, Matthew Dowle wrote: >> >> On 04.01.2013 14:03, Duncan Murdoch wrote: >> >> > On 13-01-0

Re: [Rd] Bounty on Error Checking

2013-01-04 Thread ivo welch
gents---first, thanks a lot for paying some attention to my suggestion. I always write programs with options(warn=2). but it doesn't cover everything. In particular, my code is littered with hand tests that the dimensions are correct and that variables are defined: stopifnot(is.data.frame(d) &

Re: [Rd] Bounty on Error Checking

2013-01-04 Thread Matthew Dowle
On 04.01.2013 15:22, Duncan Murdoch wrote: On 04/01/2013 10:15 AM, Matthew Dowle wrote: On 04.01.2013 14:56, Duncan Murdoch wrote: > On 04/01/2013 9:51 AM, Matthew Dowle wrote: >> On 04.01.2013 14:03, Duncan Murdoch wrote: >> > On 13-01-04 8:32 AM, Matthew Dowle wrote: >> >> >> >> On Fri, Jan 3,

Re: [Rd] Bounty on Error Checking

2013-01-04 Thread Duncan Murdoch
On 04/01/2013 10:15 AM, Matthew Dowle wrote: On 04.01.2013 14:56, Duncan Murdoch wrote: > On 04/01/2013 9:51 AM, Matthew Dowle wrote: >> On 04.01.2013 14:03, Duncan Murdoch wrote: >> > On 13-01-04 8:32 AM, Matthew Dowle wrote: >> >> >> >> On Fri, Jan 3, 2013, Bert Gunter wrote >> >>> Well... >> >

Re: [Rd] Bounty on Error Checking

2013-01-04 Thread Matthew Dowle
On 04.01.2013 14:56, Duncan Murdoch wrote: On 04/01/2013 9:51 AM, Matthew Dowle wrote: On 04.01.2013 14:03, Duncan Murdoch wrote: > On 13-01-04 8:32 AM, Matthew Dowle wrote: >> >> On Fri, Jan 3, 2013, Bert Gunter wrote >>> Well... >>> >>> On Thu, Jan 3, 2013 at 10:00 AM, ivo welch >>> anderson.

Re: [Rd] Bounty on Error Checking

2013-01-04 Thread Ben Bolker
On 13-01-04 07:48 AM, Laurent Gautier wrote: > On 2013-01-04 12:00, r-devel-requ...@r-project.org wrote: >> Message: 16 Date: Thu, 3 Jan 2013 22:52:44 + From: Ben Bolker >> To: Subject: Re: [Rd] >> Bounty on Error Checking Message-ID: >> Content-Type: text/plain

Re: [Rd] Bounty on Error Checking

2013-01-04 Thread Duncan Murdoch
On 04/01/2013 9:51 AM, Matthew Dowle wrote: On 04.01.2013 14:03, Duncan Murdoch wrote: > On 13-01-04 8:32 AM, Matthew Dowle wrote: >> >> On Fri, Jan 3, 2013, Bert Gunter wrote >>> Well... >>> >>> On Thu, Jan 3, 2013 at 10:00 AM, ivo welch >>> anderson.ucla.edu> wrote: Dear R developers

Re: [Rd] Bounty on Error Checking

2013-01-04 Thread Matthew Dowle
On 04.01.2013 14:03, Duncan Murdoch wrote: On 13-01-04 8:32 AM, Matthew Dowle wrote: On Fri, Jan 3, 2013, Bert Gunter wrote Well... On Thu, Jan 3, 2013 at 10:00 AM, ivo welch anderson.ucla.edu> wrote: Dear R developers---I just spent half a day debugging an R program, which had two bugs-

Re: [Rd] Bounty on Error Checking

2013-01-04 Thread Duncan Murdoch
On 13-01-04 8:32 AM, Matthew Dowle wrote: On Fri, Jan 3, 2013, Bert Gunter wrote Well... On Thu, Jan 3, 2013 at 10:00 AM, ivo welch anderson.ucla.edu> wrote: Dear R developers---I just spent half a day debugging an R program, which had two bugs---I selected the wrongly named variable, which

Re: [Rd] Bounty on Error Checking

2013-01-04 Thread Matthew Dowle
On Fri, Jan 3, 2013, Bert Gunter wrote Well... On Thu, Jan 3, 2013 at 10:00 AM, ivo welch anderson.ucla.edu> wrote: Dear R developers---I just spent half a day debugging an R program, which had two bugs---I selected the wrongly named variable, which turns out to have been a scalar, which th

Re: [Rd] Bounty on Error Checking

2013-01-04 Thread Laurent Gautier
On 2013-01-04 12:00, r-devel-requ...@r-project.org wrote: Message: 16 Date: Thu, 3 Jan 2013 22:52:44 + From: Ben Bolker To: Subject: Re: [Rd] Bounty on Error Checking Message-ID: Content-Type: text/plain; charset="us-ascii" ivo welch anderson.ucla.edu> writes: > &g

Re: [Rd] Bounty on Error Checking

2013-01-04 Thread Bert Gunter
Well... On Thu, Jan 3, 2013 at 10:00 AM, ivo welch wrote: > > Dear R developers---I just spent half a day debugging an R program, > which had two bugs---I selected the wrongly named variable, which > turns out to have been a scalar, which then happily multiplied as if > it was a matrix; and anoth

Re: [Rd] Bounty on Error Checking

2013-01-03 Thread Ben Bolker
ivo welch anderson.ucla.edu> writes: > > Dear R developers---I just spent half a day debugging an R program, > which had two bugs---I selected the wrongly named variable, which > turns out to have been a scalar, which then happily multiplied as if > it was a matrix; and another wrongly named var

Re: [Rd] Bounty on Error Checking

2013-01-03 Thread Matthew Dowle
Ivo, That's standard R behaviour. But I've had similar bugs as you. If you really want to change it then one way would be to create your own helper function, say strictselect(), or shorter name and ensure to use that instead of [[ and $. Or, how about something like this? : DF = data.frame(a

Re: [Rd] Bounty on Error Checking

2013-01-03 Thread Tim Triche, Jr.
Here is a JIT suggestion: add the message to errors/coredump reports "If you would like to submit a patch for this error, please contact r-devel@ r-project.org for further instructions. If you cannot, or would prefer not to, fix this error yourself, please consider donating $20 to the Fix My Bug

[Rd] Bounty on Error Checking

2013-01-03 Thread ivo welch
Dear R developers---I just spent half a day debugging an R program, which had two bugs---I selected the wrongly named variable, which turns out to have been a scalar, which then happily multiplied as if it was a matrix; and another wrongly named variable from a data frame, that triggered no error w