Skip to content

[Request/Bug?] IDate unsupported index class in as.xts.data.table #1499

Description

@micstr

Issue is on Stack Overflow with example code - Roland suggested I table issue here. Please see [http://stackoverflow.com/questions/34809554/r-xts-and-data-table-and-idate]

When I set dates with IDate (integer dates), I then get errors when looking at the table after an xts conversion with this error message:

Error in index.xts(x[1, ]) : unsupported ‘indexClass’ indexing type: IDate.

so with date as IDate in the data table:

dt.xts <- as.xts.data.table(dt) # seems to work okay but...
str(dt.xts) # gives indexing type error above

R3.2.2. versions: xts: 0.9-7 zoo: 1/7-12 data.table: 1.9.6

Activity

  1. jangorecki commented on Jan 15, 2016

    @jangorecki
    Member

    as.xts.data.table support only POSIXct and Date classes at the moment. IDate could be supported without much hassle. IDateTime on the other hand is stored as 2 columns, so would not fit into current assumption that first data.table column is used as xts index.

  2. jangorecki commented on Apr 12, 2016

    @jangorecki
    Member

    Likely to be affected by zoo issue with masking as.Date.IDate.
    To test when #1500 resolved.

  3. self-assigned this
    on Apr 13, 2016
  4. added a commit that references this issue on Apr 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions