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
Scope to include an argument on setcolorder
to remove non-referenced columns
#4030
Comments
setcolorder
to remove undefined columnssetcolorder
to remove non-referenced columns
I don't follow why this belongs in Since this is all done by reference, this approach seems natural and would be equally efficient:
Note that for efficiency we should drop first, otherwise Since it's |
@MichaelChirico, thanks for the quick response. I guess my thought was that in setting the ordering of columns, it's not out-of-scope to think that only retaining a defined subset of columns could be an argument for It's probably just me being daft, but, if it was the first time using the function and I hadn't read the help, I would have thought Your example is my current approach when I need to do this on large datasets, I guess the efficiency relates to potentially more concise code (i.e just an argument instead of having to write the Happy for this issue to be closed. Thanks for all your work on this package! |
Agree the |
Sounds good and has more application. I'll close this issue. Thanks again! |
setcolorder
will currently append non-referenced variables to the end of the new defined ordering. This is great in some circumstances, but often I (and I assume other users(?)) need to reorder and drop non-referenced variables.Is there potential scope to add an argument that allows this to occur with
setcolorder
?If it's not clear what I mean...
The text was updated successfully, but these errors were encountered: