insightsengineering / insightsengineering/teal.transform

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

Open
#213 7 comments 0 reactions 0 assignees View on GitHub
bug core
Dominant language
R
Stars
2
Forks
3
PR merge metrics
No merged PRs in 30d

Description

### What happened?

Related to https://github.com/insightsengineering/teal.modules.general/issues/735

```r
> 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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.