[R-SIG-Finance] Accessing "row names" in an object created by quantmod
Dennis Fisher
fisher at plessthan.com
Tue Sep 12 16:42:18 CEST 2017
R 3.4.1
OS X
Colleagues,
I am just learning about quantmod and I don’t understand the behavior of xts objects.
For example:
getSymbols("AAPL”)
Creates an object AAPL
tail(AAPL)
yields:
AAPL.Open AAPL.High AAPL.Low AAPL.Close AAPL.Volume AAPL.Adjusted
2017-08-31 163.64 164.52 163.48 164.00 26785100 164.00
2017-09-01 164.80 164.94 163.63 164.05 16591100 164.05
2017-09-05 163.75 164.25 160.56 162.08 29468500 162.08
2017-09-06 162.71 162.99 160.52 161.91 21651700 161.91
2017-09-07 162.09 162.24 160.36 161.26 21928500 161.26
2017-09-08 160.86 161.15 158.53 158.63 28352600 158.63
I would like to extract a row based on the date column. The usual approaches (e.g., rownames) do not work.
So, how do I extract the date column?
Dennis
Dennis Fisher MD
P < (The "P Less Than" Company)
Phone / Fax: 1-866-PLessThan (1-866-753-7784)
www.PLessThan.com
More information about the R-SIG-Finance
mailing list