I am having problems accessing the timestamp of my xts
object in R.
The structure of the object looks like this
FB.Open FB.High FB.Low FB.Close FB.Volume FB.WAP FB.hasGaps FB.Count
2015-10-30 10:40:00 104.61 104.62 104.35 104.38 4532 104.472 0 2067
I have no problems accessing FB.Open
, FB.High
, etc.
I am doing so by calling data[1,1]
for example and would get the following
FB.Open
2015-10-30 10:30:00 104.38
The problem is when I try to access the index
For example, when I do something like
data[1,0]
I would get
2015-10-30 10:30:00
I get an xts
object with zero-width which I can't seem to manipulate.
I simply need to put the timestamp inside a variable.
Any tip in the right direction will be appreciated.
Thanks