Skip to content

as.IDate() drops names #7252

Description

@DavisVaughan

With data.table 1.16.2

library(data.table)

x <- c(a = "2019-01-01")
x
#>            a 
#> "2019-01-01"

as.IDate(x)
#> [1] "2019-01-01"

# data.table:::as.IDate.Date calls this
# as.integer() step loses names
as.integer(as.Date(x))
#> [1] 17897

Created on 2025-08-14 with reprex v2.1.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions