Re: [Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-30 Thread Benilton Carvalho
Thank you Martin, for putting this together. Cheers, b On Nov 30, 2009, at 11:10 AM, maech...@stat.math.ethz.ch wrote: >> Tony Plate >>on Sun, 22 Nov 2009 10:21:33 -0600 writes: > >> maech...@stat.math.ethz.ch wrote: "PD" == Peter Dalgaard on Fri, 20 Nov 2009 09:54

Re: [Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-30 Thread maechler
> Tony Plate > on Sun, 22 Nov 2009 10:21:33 -0600 writes: > maech...@stat.math.ethz.ch wrote: >>> "PD" == Peter Dalgaard >>> on Fri, 20 Nov 2009 09:54:34 +0100 writes: >>> >> PD> m...@celos.net wrote: >> >> Arrays of POSIXlt dates always retu

Re: [Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-23 Thread Gabor Grothendieck
I agree it should be changed. Perhaps there could be a global option that gives the previous behavior. The global option would be deprecated after a while but in the interim it would give package developers a change to move over and to try it under both definitions. On Fri, Nov 20, 2009 at 1:05

Re: [Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-22 Thread Tony Plate
maech...@stat.math.ethz.ch wrote: "PD" == Peter Dalgaard on Fri, 20 Nov 2009 09:54:34 +0100 writes: PD> m...@celos.net wrote: >> Arrays of POSIXlt dates always return a length of 9. This >> is correct (they're really lists of vectors of seconds, >> hours, and

Re: [Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-20 Thread maechler
> "PD" == Peter Dalgaard > on Fri, 20 Nov 2009 09:54:34 +0100 writes: PD> m...@celos.net wrote: >> Arrays of POSIXlt dates always return a length of 9. This >> is correct (they're really lists of vectors of seconds, >> hours, and so forth), but other methods disguise

Re: [Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-20 Thread mark
Benilton Carvalho writes: > I'm no expert on this, but my understanding is that the choice was > to stick to the definition. > > The help file for length() [1] says: > > "For vectors (including lists) and factors the length is the number > of elements." > > The help file for POSIXlt [2] (for exa

Re: [Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-20 Thread Mark White
Benilton Carvalho writes: > I'm no expert on this, but my understanding is that the choice was > to stick to the definition. > > The help file for length() [1] says: > > "For vectors (including lists) and factors the length is the number > of elements." > > The help file for POSIXlt [2] (for exa

Re: [Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-20 Thread Romain Francois
On 11/20/2009 09:54 AM, Peter Dalgaard wrote: m...@celos.net wrote: Arrays of POSIXlt dates always return a length of 9. This is correct (they're really lists of vectors of seconds, hours, and so forth), but other methods disguise them as flat vectors, giving superficially surprising behaviour:

Re: [Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-20 Thread Peter Dalgaard
m...@celos.net wrote: Arrays of POSIXlt dates always return a length of 9. This is correct (they're really lists of vectors of seconds, hours, and so forth), but other methods disguise them as flat vectors, giving superficially surprising behaviour: strings <- paste('2009-1-', 1:31, sep='')

Re: [Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-19 Thread William Dunlap
hat discusses why > > objects of class POSIXlt always need to return a > > length of 9? > > > > Thanks > > Steve McKinney > > > > > >> -Original Message- > >> From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r- > >&

Re: [Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-19 Thread Steven McKinney
> -Original Message- > From: Benilton Carvalho [mailto:bcarv...@jhsph.edu] > Sent: Thursday, November 19, 2009 6:59 PM > To: Steven McKinney > Cc: 'm...@celos.net'; 'r-de...@stat.math.ethz.ch' > Subject: Re: [Rd] Surprising length() of POSIXlt vec

Re: [Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-19 Thread Benilton Carvalho
19, 2009 4:29 PM To: m...@celos.net Cc: r-de...@stat.math.ethz.ch Subject: Re: [Rd] Surprising length() of POSIXlt vector (PR#14073) Check the documentation and the archives. Not a bug. b On Nov 19, 2009, at 8:30 PM, m...@celos.net wrote: Arrays of POSIXlt dates always return a length of 9. T

Re: [Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-19 Thread Steven McKinney
.@celos.net > Cc: r-de...@stat.math.ethz.ch > Subject: Re: [Rd] Surprising length() of POSIXlt vector (PR#14073) > > Check the documentation and the archives. Not a bug. b > > On Nov 19, 2009, at 8:30 PM, m...@celos.net wrote: > > > Arrays of POSIXlt dates always return a

Re: [Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-19 Thread Benilton Carvalho
Check the documentation and the archives. Not a bug. b On Nov 19, 2009, at 8:30 PM, m...@celos.net wrote: Arrays of POSIXlt dates always return a length of 9. This is correct (they're really lists of vectors of seconds, hours, and so forth), but other methods disguise them as flat vectors, giv

[Rd] Surprising length() of POSIXlt vector (PR#14073)

2009-11-19 Thread mark
Arrays of POSIXlt dates always return a length of 9. This is correct (they're really lists of vectors of seconds, hours, and so forth), but other methods disguise them as flat vectors, giving superficially surprising behaviour: strings <- paste('2009-1-', 1:31, sep='') dates <- strptime(strin