Displaying 2 results from an estimated 2 matches for "addseries".
2018 Jan 18
0
Split charts with ggplot2, tidyquant
Hi Charlie,
I am comfortable to put the data in any way that works best. Here are two
possibilities: an xts and a data frame.
library(quantmod)
quantmod::getSymbols("SPY") # creates xts variable SPY
SPYxts <- SPY[,c("SPY.Close","SPY.Volume")]
SPYdf <- data.frame(Date=index(SPYxts),close=as.numeric(SPYxts$SPY.Close),
2018 Jan 18
3
Split charts with ggplot2, tidyquant
Could you provide some information on your data structure (e.g., are the
two time series in separate columns in the data)? The solution is fairly
straightforward once you have the data in the right structure. And I do
not think tidyquant is necessary for what you want.
Best,
Charlie
--
Charles Redmon
GRA, Center for Research Methods and Data Analysis
PhD Student, Department of Linguistics