[R-SIG-Finance] NA's in xts object index

Joshua Ulrich josh.m.ulrich at gmail.com
Wed Dec 26 20:37:53 CET 2012

Hi Muhammad,

It is nearly impossible to help if you do not provide a minimal,
reproducible example that demonstrates this behavior.  This post on
Stackoverflow provides helpful instructions:

It would also help if you follow the "Surprising behavior and bugs"
section of the posting guide:

Joshua Ulrich  |  about.me/joshuaulrich
FOSS Trading  |  www.fosstrading.com

On Thu, Dec 13, 2012 at 1:05 PM, Muhammad Abuizzah <izzah100 at yahoo.com> wrote:
> I created an xts object using POSIXct from tick market data.  I have used this before without problems, but for some reason today I am getting all NAs in my xts object.
> I had that problem before when I used package chron, but I am not using chron today.
> Other things that caused similar results in the past was when there was inconsistencies with timezone or the original start date was not defined.  I recreated the data defining the timezone,  and origin = "1970-01-01"
> but the issue was not resolved.
> When I run this code: head(.index(myxts)) i get NA NA NA NA NA.  I run it without the dot head(index(myxts)) and I get the same results, 5 NAs
> My understanding is that if you have an xts object, it must have an index made of time that is ordered.  How can I have NAs then if class(myxts) shows xts
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.

More information about the R-SIG-Finance mailing list