On Nov 13, 2016 13:54, "Henrik Bengtsson"
wrote:
>
> It looks like a bug. I don't think c.Date() is every called, because:
>
> > trace(c.Date, tracer = quote(message("c.Date() called")))
> Tracing function "c.Date" in package "base"
> [1] "c.Date"
>
> Tracing works:
>
It looks like a bug. I don't think c.Date() is every called, because:
> trace(c.Date, tracer = quote(message("c.Date() called")))
Tracing function "c.Date" in package "base"
[1] "c.Date"
Tracing works:
> c(as.Date(1L), as.Date(10001L))
Tracing c.Date(as.Date(1L), as.Date(10001L)) on
I'm still not clear about whether this is a bug in foreach. Should c.Date be
invoked by foreach with .combine='c'?
On 11/06/2016 07:02 PM, William Dunlap wrote:
Note that in the OP's example c.Date is never invoked. c.Date is called if
.combine
calls c rather than if .combine is c:
>
Yes, I should have put
> library(foreach)
> library(zoo)
at the top.
On 11/06/2016 05:20 PM, Duncan Murdoch wrote:
> On 06/11/2016 5:02 PM, Jim Lemon wrote:
>> hi James,
>> I think you have to have a starting date ("origin") for as.Date to
>> convert numbers to dates.
>
> That's true with
Note that in the OP's example c.Date is never invoked. c.Date is called if
.combine
calls c rather than if .combine is c:
> library(zoo)
> trace(c.Date, quote(print(sys.call(
Tracing function "c.Date" in package "base"
[1] "c.Date"
> foreach(i=1:10003, .combine=c) %do% { as.Date(i) }
[1]
On 06/11/2016 5:02 PM, Jim Lemon wrote:
hi James,
I think you have to have a starting date ("origin") for as.Date to
convert numbers to dates.
That's true with the function in the base package, but the zoo package
also has an as.Date() function, which defaults the origin to
"1970-01-01". If
hi James,
I think you have to have a starting date ("origin") for as.Date to
convert numbers to dates.
Jim
On Sun, Nov 6, 2016 at 12:10 PM, James Hirschorn
wrote:
> This seemed odd so I wanted to check:
>
> > x <- foreach(i=1:10100, .combine='c') %do% {
7 matches
Mail list logo