Closed ggrothendieck closed 3 years ago
Thanks for the report! I'll take a look.
Here's a minimal reproducible example:
library(xts)
data(sample_matrix)
x <- as.xts(sample_matrix)
y <- x[1:5,1] * 1i
z <- x[3:9,4] * 1i
a <- merge(y, z)
# Error in merge.xts(y, z) :
# REAL() can only be applied to a 'numeric', not a 'complex'
Regarding the quantmod example what would be nice would be if a column could contain the entire OHLCV rather than just close and volulme. Would it be feasible to support a new tuple type that is like complex except it would allow each column to contain multiple columns, not just 2 like complex does.
This gives an error:
If we convert to zoo and back then we do not get any errors: