Re: [Rd] Error Reporting

2007-04-24 Thread ivo welch
thank you, duncan. I get this particular error from subset(d, select=c( list.of.many.variables.one.of.which.is.misspelled) ); this is probably not too uncommon in data sets with many long-named variables. hunting down what causes it is a pain. I am definitely looking forward to 2.6.0 and hope t

Re: [Rd] nlevels() is 0 and not NA

2007-04-24 Thread Prof Brian Ripley
On Tue, 24 Apr 2007, Duncan Murdoch wrote: > On 4/24/2007 4:58 AM, Torsten Hothorn wrote: >>> nlevels(c("a", "b")) >> [1] 0 >> >> but the documentation in R 2.5.0 (and earlier) says >> >> If the argument is not a 'factor', 'NA' is returned. >> >> I hope it isn't too late, I only came across t

Re: [Rd] nlevels() is 0 and not NA

2007-04-24 Thread Duncan Murdoch
On 4/24/2007 4:58 AM, Torsten Hothorn wrote: >> nlevels(c("a", "b")) > [1] 0 > > but the documentation in R 2.5.0 (and earlier) says > > If the argument is not a 'factor', 'NA' is returned. > > I hope it isn't too late, I only came across this in a lecture this > morning. It's too late f

Re: [Rd] Error Reporting

2007-04-24 Thread Duncan Murdoch
On 4/23/2007 7:23 PM, ivo welch wrote: > Dear R developers: May I suggest that future versions of R improve a > little on the error reporting? For example, right now, I am trying to > figure out which of my column names in a select statement has been > mis-spelled: > > Error in `[.data.frame`(x,

Re: [Rd] setClass inside a function

2007-04-24 Thread Iago Mosqueira
Hi Martin, Thanks very much, your suggestion on the "where" argument did the trick. Many thanks, Iago > > "Iago Mosqueira (Cefas)" <[EMAIL PROTECTED]> writes: > > > Hi Martin, > > > > Thanks very much for your help. > > > >> Hi Iago -- > >> > >> Here's my attempt at an answer

[Rd] nlevels() is 0 and not NA

2007-04-24 Thread Torsten Hothorn
> nlevels(c("a", "b")) [1] 0 but the documentation in R 2.5.0 (and earlier) says If the argument is not a 'factor', 'NA' is returned. I hope it isn't too late, I only came across this in a lecture this morning. Best, Torsten __ R-devel@r-p

[Rd] Error Reporting

2007-04-24 Thread ivo welch
Dear R developers: May I suggest that future versions of R improve a little on the error reporting? For example, right now, I am trying to figure out which of my column names in a select statement has been mis-spelled: Error in `[.data.frame`(x, r, vars, drop = drop) : undefined columns