Hi,
i thought this should be pretty trivial, but i am missing something here
Why can't  I merge a list L of xts objects (all even with the same index)
Thanks,
Jiri

# code
library(xts)

random.xts <- function(x0=1.0,n=100,k=10,c="A",rnd=F) {
  n.c <- length(c)*k
  if (rnd)
    x <- matrix(rnorm(n*n.c,x0,1),n,n.c)
  else
    x <- matrix(x0,n,n.c)

  t <- Sys.Date() - (1:n) -1
  x <- xts(x,t)
  colnames(x) <- paste(c,1:n.c,sep=".")
  return(x)
}

test <- function(n=10,k=4,c=3) {
  lapply(c(1:c),function(x) random.xts(x,n,k,paste(x)))
}

L <- test()
merge(L)

	[[alternative HTML version deleted]]

