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

Change as_factor() to convert ordered factors to plain factors #237

Merged
merged 3 commits into from
Jan 31, 2020

Conversation

robinsones
Copy link
Contributor

Closes #216.

I used structure() as that's what as_factor.character uses. Added two tests and a NEWS item as well.

add test for as_factor stripping order

add news item as_factor ordered change

fix as_factor
R/as_factor.R Outdated Show resolved Hide resolved
tests/testthat/test-as_factor.R Outdated Show resolved Hide resolved
@hadley hadley merged commit 21aba84 into tidyverse:master Jan 31, 2020
@hadley
Copy link
Member

hadley commented Jan 31, 2020

Thanks @robinsones!

@hadley hadley added the tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day label Jan 31, 2020
@hadley
Copy link
Member

hadley commented Feb 29, 2020

Unfortunately I had to revert this PR because it causes haven to fail R CMD check. That's totally a bug with haven, but because haven has C warnings that are slightly outside of my control, it's unfortunately easier to revert here than to squeeze out a quick haven release.

hadley added a commit that referenced this pull request Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: handle ordered factors within as_factor()
2 participants