I imported some time series data via quantmod and the respective xts object contains several different columns not only one with different prices over time (open close ect). How do I properly call/subset a specific column in a xts object as I need only to work with one of them of further analysis? getSymbols gets me several price infos per day I dont all need/want.
library(quantmod)
data <- getSymbols("GOOGL",src = "yahoo", from = "2000-01-01", to = "2015-01-01")
data <- data[ ,"GOOGL.Open"] #trying to subset like this
data <- data[ , 3] #or this
Nothin worked yet. There must be some easy solution. Of course I want to preserve the xts structure. Thank you a lot!
options(getSymbols.auto.assign = FALSE)
. Then after runninggetSymbols
useOp(data)
– G. Grothendieck