我期望cbind.xts并do.call(cbind.xts)以相似的经过时间执行.R2.11,R2.14也是如此.
对于R2.15.2和xts 0.8-8,do.call(cbind.xts,...)变体执行速度非常慢,这有效地破坏了我以前的代码.
正如Josh Ulrich在下面的评论中指出的那样,xts软件包维护者已经意识到了这个问题.与此同时,有一个方便的工作吗?
可重复的例子:
library(xts)
secs <- function (rows, from = as.character(Sys.time()), cols = 1, by = 1) 
{
    deltas <- seq(from = 0, by = by, length.out = rows)
    nacol <- matrix(data = NA, ncol = cols, nrow = rows)
    xts(x = nacol, order.by = strptime(from, format = "%Y-%m-%d %X") + 
        deltas)
}
n <- 20
d1 <- secs(rows=n*100,cols=n)
d2 <- secs(rows=n*100,cols=n)
system.time(cbind.xts(d1,d2))
与
system.time(do.call(cbind.xts, list(d1,d2)))