I am using quantmod which generates XTS objects with ticker info, and I am looking to compile/stack a bunch of XTS documents on top of each other to process code. Using Rbind with XTS I find that it does not stack XTS on top of each other, rather it merges and sorts by date:
x <- xts(1:10, Sys.Date()+1:10)
x
[,1]
2014-07-10 1
2014-07-11 2
2014-07-12 3
2014-07-13 4
2014-07-14 5
2014-07-15 6
2014-07-16 7
2014-07-17 8
2014-07-18 9
2014-07-19 10
y <- xts(rep(2,3), Sys.Date()+c(1,2,3))
y
[,1]
2014-07-10 2
2014-07-11 2
2014-07-12 2
rbind(x,y)
[,1]
2014-07-10 1
2014-07-10 2
2014-07-11 2
2014-07-11 2
2014-07-12 3
2014-07-12 2
2014-07-13 4
2014-07-14 5
2014-07-15 6
2014-07-16 7
2014-07-17 8
2014-07-18 9
2014-07-19 10
Warning message: In rbind(deparse.level, ...) : mismatched types: converting objects to numeric
Question 1 - Why is there a warning message?
Question 2 - How can I stack the XTS properly, probably a newbie question, but need the bind to look like this:
2014-07-10 1
2014-07-11 2
2014-07-12 3
2014-07-13 4
2014-07-14 5
2014-07-15 6
2014-07-16 7
2014-07-17 8
2014-07-18 9
2014-07-19 10
2014-07-10 2
2014-07-11 2
2014-07-12 2