Skip to content
Prev 154829 / 398503 Next

R Newbie: quantmod and zoo: Warning in rbind.zoo(...) : column names differ

On Wed, 3 Sep 2008, Aval Sarri wrote:

            
The data in objects part1 and part3 are both matrices of dimension 10x1 
and 11x1, respectively, with column name USD.EUR. part2, on the other 
hand, contains a vector of length 10 and consequently has no column names.
Hence, column matching does not work and the c()/rbind() method complains.

The easiest thing is to turn part3 into a vector and then combine
   c(part2, part3[,1])

The reason for part2 being different is the following: zoo seems to drop 
the dimension of 1-column series in a few places, e.g., in read.zoo(). 
I just added a drop = TRUE argument to read.zoo() in the devel version.

hth,
Z