Skip to content

arrange() does not preserves the attributes of hms class variable #7624

@pangchaoran

Description

@pangchaoran

In the data frame returned by arrange(), the attribute of hms class variable disappears, though the attributes of other variables are preserved.

df1 <- tibble(var1=1:5, var2=hms::hms(1:5))
attr(df1$var1,'label') <- "variable 1"
attr(df1$var2,'label') <- "variable 2"
df2 <- df1 |> arrange(var1)
attr(df2$var1,'label')
attr(df2$var2,'label')

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