-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
transpose & flatten declasses (at least dttm
objects)
#803
Comments
dttm
objects)dttm
objects)
I've just noticed that > list(Sys.time())
# [[1]]
# [1] "2020-11-14 23:34:39 MST"
> list(Sys.time()) %>% flatten()
# [[1]]
# [1] 1605422083 |
This will be fixed once we implement purrr on top of vctrs. |
In the meantime, I have found that library(purrr)
library(tibble)
foo <- tibble(now = Sys.time())
foo
#> # A tibble: 1 x 1
#> now
#> <dttm>
#> 1 2021-01-16 17:25:02
purrr::transpose(foo)
#> [[1]]
#> [[1]]$now
#> [1] 1610839503
purrr::pmap(foo, list)
#> [[1]]
#> [[1]]$now
#> [1] "2021-01-16 17:25:02 CST" Created on 2021-01-16 by the reprex package (v0.3.0) Acknowledgements@jennybc's fabulous tutorials on data rectangling led me to this solution. |
Using purrr v0.3.4, when I transpose a data.frame with a datetime column, that column is de-classed:
Is this expected?
The text was updated successfully, but these errors were encountered: