-
Notifications
You must be signed in to change notification settings - Fork 64
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
df_paste preserves factors but drops unseen levels #39
Comments
If the data is coming from an existing structure then I'd say preserve factor levels. Happy to look into making that happen. |
I'm unsure about merging this. It has never be raised by a user, this was just me making a note of the behaviour. One of the primary cases when using data from an existing structure is to create a small subset for an example. If you're subsetting a dataframe to become an example, I presume you probably want the factor levels chopped as well, since if those levels were important for the example you would have been sure to include them. I am guessing this change might result in a few people having to manually fudge the factor levels and that is not what I would want. If you're taking the whole data frame, there is no issue. |
All good. I saw it as a 'see how hard it is to do' sort of thing. One option is to have it activated with an argument, defaulting to dropping levels. I can update if that's something you'd like to try out. |
Leaving factor behaviour as-is for now. |
example:
Part of me is happy with this since unused factor levels are usually annoying. However this may be unexpected for some people.
The text was updated successfully, but these errors were encountered: