xts objects should almost always have a dim attribute, but these xts objects do not have dims.
I say "almost always" because merge.xts() has removed the 'dim' attribute from zero-column results since the beginning of time. It will very likely break stuff if we set dim(result) <- c(0, 0) because users probably use is.null(dim(x))... xts even does this internally.
xts objects should almost always have a dim attribute, but these xts objects do not have dims.
I say "almost always" because
merge.xts()
has removed the 'dim' attribute from zero-column results since the beginning of time. It will very likely break stuff if we setdim(result) <- c(0, 0)
because users probably useis.null(dim(x))
... xts even does this internally.Strangely, the
.xts()
constructor adds dims to an empty object and says it has 1 column. I expected it to bec(0, 0)
instead.This is a regression from version 0.12.2.