[R] RTAQ - convert function: warning causes incorrect loading of data
R. Michael Weylandt
michael.weylandt at gmail.com
Fri Oct 12 22:52:22 CEST 2012
I'm forwarding this to the R-SIG-Finance list, where ou'll have a more
In the meanwhile, you may wish to look at
Finally, I note you're posting from Nabble. Please do include context in
your reply -- I don't believe Nabble does this automatically, so
you'll need to manually include it. Most of the regular respondents on
these lists don't use Nabble -- it is a _mailing list_ after all -- so
we don't get the forum view you do, only emails of the individual
posts. Combine that with the high volume of posts, and it's quite
difficult to trace a discussion if we all don't make sure to include
On Fri, Oct 12, 2012 at 7:01 PM, caprarn9 <caprarn9 at cs.man.ac.uk> wrote:
> I am closely following the RTAQ documentation in order to load my dataset
> into R, however I get this warning when running the convert function in the
> following way:
> convert(from="2010-11-01", to="2010-11-01",datasource=datasource,
> extention="csv", header=T, tradecolnames=c("SYMBOL", "DATE", "TIME",
> "PRICE", "SIZE", "G127", "CORR", "COND", "EX"), quotecolnames=c("SYMBOL",
> "DATE", "TIME", "BID", "OFR", "BIDSIZ", "OFRSIZ", "MODE", "EX"))
> The only warning returned is:
> In `[<-.factor`(`*tmp*`, is.na(tdata$G127), value = c(1L, 1L, 1L, :
> invalid factor level, NAs generated
> As it is a warning, the .RData files still get created and I can use TAQLoad
> to load them:
> x <-
> The PROBLEM:
> SYMBOL EX PRICE SIZE COND CORR G127
> <NA> "BAC" "B" "11.4900" " 500" "@" "0" "0"
> This is the same for the quotes objects, but different headers obviously. I
> get a <NA> instead of the expected YYY-MM-DD HH:MM:SS format for each
> I've spent a fair number of hours on trying to get this right, no success.
> Can you please provide me with some guidance?
> Thank you.
> A sample from the CSV files I use:
> View this message in context: http://r.789695.n4.nabble.com/RTAQ-convert-function-warning-causes-incorrect-loading-of-data-tp4646025.html
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help