[Rd] Weird issue when iterating through dates

2015-08-06 Thread Luca Cerone
Dear all, I am experiencing a weird issue when iterating through dates in R (3.1.2 and 3.2.1 on 64bit linux machines) I am bit surprised about the behaviour of this snippet of code: d1 <- as.Date('2015-01-01') d2 <- as.Date('2015-01-31') for ( dt in seq(d1,d2, by=1) ) { dt <- as.character(dt)

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.

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
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 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

[Rd] R-patched is now R-beta?

2015-08-06 Thread Peter Langfelder
Just downloaded the newest R-patched.tar.bz. DEcompressing and untarring now produces a directory R-beta instead of the usual (for me, at least) R. The file VERSION now says 3.2.2 beta. Just wanted to double-check that there is no mixup of development and patched versions. Thanks, Peter

Re: [Rd] R-patched is now R-beta?

2015-08-06 Thread Dirk Eddelbuettel
On 6 August 2015 at 11:33, Peter Langfelder wrote: | Just downloaded the newest R-patched.tar.bz. DEcompressing and | untarring now produces a directory R-beta instead of the usual (for | me, at least) R. The file VERSION now says 3.2.2 beta. Just wanted to | double-check that there is no mixup of

Re: [Rd] R-patched is now R-beta?

2015-08-06 Thread Peter Langfelder
Thanks! Peter On Thu, Aug 6, 2015 at 12:07 PM, Dirk Eddelbuettel wrote: > > On 6 August 2015 at 11:33, Peter Langfelder wrote: > | Just downloaded the newest R-patched.tar.bz. DEcompressing and > | untarring now produces a directory R-beta instead of the usual (for > | me, at least) R. The file

Re: [Rd] R-patched is now R-beta?

2015-08-06 Thread Duncan Murdoch
On 06/08/2015 3:07 PM, Dirk Eddelbuettel wrote: > > On 6 August 2015 at 11:33, Peter Langfelder wrote: > | Just downloaded the newest R-patched.tar.bz. DEcompressing and > | untarring now produces a directory R-beta instead of the usual (for > | me, at least) R. The file VERSION now says 3.2.2 bet

Re: [Rd] update.packages(checkBuilt=TRUE, ask=FALSE): possible bug

2015-08-06 Thread Jose Claudio Faria
> > I'd like to see a reproducible example before I declared it to be a bug > that needs fixing. > > Do note the news item in R-patched (soon to be R 3.2.2): > > | - download.packages()| failed for |type| equal to either |"both"| or > |"binary"|. (Reported by Dan Tenenbaum.) > > install.packages()

Re: [Rd] update.packages(checkBuilt=TRUE, ask=FALSE): possible bug

2015-08-06 Thread Duncan Murdoch
On 06/08/2015 7:16 PM, Jose Claudio Faria wrote: > I'd like to see a reproducible example before I declared it to be a > bug that needs fixing. > > Do note the news item in R-patched (soon to be R 3.2.2): > > | - download.packages()| failed for |type| equal to either |"both"| >

Re: [Rd] update.packages(checkBuilt=TRUE, ask=FALSE): possible bug

2015-08-06 Thread Dirk Eddelbuettel
On 6 August 2015 at 20:16, Jose Claudio Faria wrote: | The bug described is occurring with all recent distributions available! | | I discovery today, after install R version 3.2.2 beta (2015-08-04 r68843), | that the bug happens when I copy my packages from old distribution to the | library folde