Skip to content
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

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

Open
m7pr opened this issue Apr 17, 2024 · 0 comments
Open

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

m7pr opened this issue Apr 17, 2024 · 0 comments

Comments

@m7pr
Copy link
Contributor

m7pr commented Apr 17, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant