Re: [Rd] Weird issue when iterating through dates

2015-08-13 Thread Martin Maechler
(Resend: was meant for R-devel, not just Joshua) > On Wed, Aug 12, 2015 at 10:55 AM, Gábor Csárdi wrote: > > I am not sure if this is a bug or not. > > > I would argue that this isn't a bug, not even in the documentation of > "for" (even though it might be clearer). ?"for" says that `seq` is > "

Re: [Rd] Weird issue when iterating through dates

2015-08-12 Thread Joshua Ulrich
On Wed, Aug 12, 2015 at 10:55 AM, Gábor Csárdi wrote: > I am not sure if this is a bug or not. > I would argue that this isn't a bug, not even in the documentation of "for" (even though it might be clearer). ?"for" says that `seq` is "[A]n expression evaluating to a vector (including a list and a

Re: [Rd] Weird issue when iterating through dates

2015-08-12 Thread Gábor Csárdi
I am not sure if this is a bug or not. Gabor On Wed, Aug 12, 2015 at 11:51 AM, Luca Cerone wrote: > Following up on this, should I report a bug? can you drive me through > the process? > > Cheers, > Luca > > On Thu, Aug 6, 2015 at 4:55 PM, William Dunlap wrote: Just a quick question: what'

Re: [Rd] Weird issue when iterating through dates

2015-08-12 Thread Luca Cerone
Following up on this, should I report a bug? can you drive me through the process? Cheers, Luca On Thu, Aug 6, 2015 at 4:55 PM, William Dunlap wrote: >>> Just a quick question: what's the difference between `[.Date` and >>> `[[.Date`? >>> Is it supposed to be the method for accessing the value

Re: [Rd] Weird issue when iterating through dates

2015-08-06 Thread William Dunlap
>> Just a quick question: what's the difference between `[.Date` and `[[.Date`? >> Is it supposed to be the method for accessing the value right? > >For Dates and atomic vectors in general they are the same, but ... Even for atomic vectors with names they are not quite the same > c(One=1, Two

Re: [Rd] Weird issue when iterating through dates

2015-08-06 Thread Gábor Csárdi
On Thu, Aug 6, 2015 at 6:30 AM, Luca Cerone wrote: [...] > Just a quick question: what's the difference between `[.Date` and `[[.Date`? > Is it supposed to be the method for accessing the value right? For Dates and atomic vectors in general they are the same, but in general they are two differe

Re: [Rd] Weird issue when iterating through dates

2015-08-06 Thread Luca Cerone
Thanks Gàbor, I thought there was some mistake in my logic on how casting works in R and wanted to be sure. Just a quick question: what's the difference between `[.Date` and `[[.Date`? Is it supposed to be the method for accessing the value right? Thanks again for your help, Cheers, Luca On Th

Re: [Rd] Weird issue when iterating through dates

2015-08-06 Thread Gábor Csárdi
Date has a `[.Date` method and also `[[.Date`, but it looks like a for loop does not consider the class of the object you are iterating over, so these are ignored and the internal representation is used. I think this is a bug, at least in the documentation of ?"for". Interestingly, lapply and co.