Skip to content

tribble() does not handle correctly objects of class Period (lubridate) #784

@mbeer

Description

@mbeer

Using tribble() to create a tibble with an object of class Period (lubridate) fails. The object is saved as numeric 0. When the same is done with tibble(), everything is fine. See the reprex below.

This might be linked to issue #770 I had reported earlier.

library(tibble)
tribble(~period, lubridate::days(1))
#> # A tibble: 1 x 1
#>   period
#>    <dbl>
#> 1      0
tibble(period = lubridate::days(1))
#> # A tibble: 1 x 1
#>   period     
#>   <Period>   
#> 1 1d 0H 0M 0S

Created on 2020-06-05 by the reprex package (v0.3.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions