Open DavisVaughan opened 1 year ago
I'm seeing this occur with a filter
call on a data.table. Is this the same issue?
Dates = as.IDate(c("2018-04-02", "2018-04-03", "2018-04-04"))
Letters = c("A", "B", "C")
dt = data.table(Date = Dates, Letter = Letters)
dt %>%
pull(Date) %>%
typeof()
#> [1] "integer"
dt %>%
filter(Letter != "A") %>%
pull(Date) %>%
typeof()
#> [1] "double"
This relates to @tidyverse dplyr
too, which I don't think is expected behavior.
x = structure(1509375600L, class = c("POSIXct", "POSIXt"), tzone = "UTC")
typeof(x)
#> [1] "integer"
dplyr::first(x)
#> [1] "2017-10-30 15:00:00 UTC"
typeof(vctrs::vec_slice(x, 1L))
#> [1] "double"
typeof(dplyr::first(x))
#> [1] "double"
Created on 2024-07-15 with reprex v2.1.0
From https://github.com/tidyverse/dplyr/issues/6687