-
Notifications
You must be signed in to change notification settings - Fork 21
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
Set colum index for mutations #68
Comments
You can use selectors with select to make this less painful, e.g.:
This puts |
That's interesting but I don't think it covers my use case. I wanted to insert |
Instead of adding this as an option to
|
I see! You can use the function API to accomplish this with select. e.g.:
Or
|
Thanks for these examples. In your first example, would the first key be duplicated when you call I think I would still find it easier and more readable to have it in some kind of tidy function but I understand if this is out of scope for what you want to do. |
Once a key has been selected, it stays in that spot, so there's no issue duplicating it with everything(). We could add |
Sounds good |
Does anyone else run into the problem where you want to add a new column via
mutate
but you don't want that new key to be added at the very end? One common example is I have a bunch of state fips codes that are my first column and I add the full state name via a lookup with amutate
call. I'd like to have that full state name then be the second column so my spreadsheet is easier to read. I could do aselect
/pick
call but I'd have to write out all of my columns and that is a bit verbose.Perhaps mutate could be supplied an index and it inserts the key at that index? Open to other workarounds people have found for this...
The text was updated successfully, but these errors were encountered: