![]() In file "split_ab.csv", lines 2360 have timestamps of 0. If any of them are zero, they will be the first observations in the xts object.Īs I suspected, the data in your CSV is not what you expect. xts orders all the timestamps in your file. It is not true that, "the xts function reads the first few time stamps as the origin date of 1". Please let me know if any additional information is needed. A few more eyes on it would be of great help. I suspected, like many people suggested, it might be a problem with the data but I cant seem to pinpoint where the problem is or if its even the data at all. I even tried splitting the data into 100,000 rows each instead of 50,000 and I still face the same problem. The first few rows then read and then converges back to normality. I have pinpointed that the problem occurs at the as.xts function, when it tries to convert the "p" data frame to an xts object. Its even more weird that it happens with a few files in the folder and not with the rest. Hence "b" contains 4808544 rows and is a 73.4mb xts object: > b head(b) ) :Ĭharacter string is not in a standard unambiguous formatīut then when I run it on the "split-ab.csv" for some reason the xts function reads the first few time stamps as the origin date of 1 and then aggregates the data from there. f as.xts(f2)Įrror in as.POSIXlt.character(x, tz. ![]() After doing all the necessary fixes of removing Nas and changing the time format. I loaded the data on R using the read.csv function. csv file containing highfrequency data for SIZ5(silver futures) and I am trying to bring it to an xts object so I can use some of the functions in the "highfrequency" package.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |