Skip to content

[Bug]: value_choices.data.frame omit the order of ordered factors #213

Open
@m7pr

Description

@m7pr

What happened?

Related to insightsengineering/teal.modules.general#735

> as.character(value_choices(CO2, "Plant"))
 [1] "Qn1" "Qn2" "Qn3" "Qc1" "Qc2" "Qc3" "Mn1" "Mn2" "Mn3"
[10] "Mc1" "Mc2" "Mc3"
> levels(CO2$Plant)
 [1] "Qn1" "Qn2" "Qn3" "Qc1" "Qc3" "Qc2" "Mn3" "Mn2" "Mn1"
[10] "Mc2" "Mc3" "Mc1"
> 
> identical(
+   as.character(value_choices(CO2, "Plant")),
+   levels(CO2$Plant)
+ )
[1] FALSE

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions