TysonStanley / tidyfast

Fast and efficient alternatives to tidyr functions built on data.table #rdatatable #rstats
https://tysonbarrett.com/tidyfast/
187 stars 4 forks source link

Implement column_selector() #17

Closed markfairbanks closed 4 years ago

markfairbanks commented 4 years ago

I made an improvement to the column selection process used in dt_pivot_longer() & dt_pivot_wider().

The last version worked but was a bit hacky by identifying columns to drop in dt_pivot_longer() using grepl("-", cols). The user also didn't have the ability to identify drop columns at all in dt_pivot_wider(). Another benefit of the new way is that the user can now use x:z or -(x:z) to select/unselect ranges of columns.

TysonStanley commented 4 years ago

This looks great! Definitely like the column_selector() approach far better. Should be safer. Made some minor adjustments and will merge once the checks are all done.

TysonStanley commented 4 years ago

Also, I added you as a collaborator here on GitHub as well so you can make changes and add branches without needing to fork the repository. You'll need to accept the invitation when it arrives.

markfairbanks commented 4 years ago

@TysonStanley Thanks for adding me as a collaborator, glad the pivots have been working out. I wanted to see what the preferred way is for me to make changes to tidyfast? Are there different ways depending on the size of the change?

Some examples:

This came up because I have an update to column_selector() which allows for things like c(x:z, -y). I haven't been a collaborator in someone else's repo before, so I wasn't sure on the process.

Also - is there a preferred way for me to ask general questions such as these?

TysonStanley commented 4 years ago

So now, you can work directly with "TysonStanley/tidyfast" instead of using your forked repository. It makes it so you are always up-to-date. So you can open up the main repository and clone it to your desktop and work directly there.

Generally, when you make changes working directly from the main repository, you'll create a branch (name it whatever you want for that pull request) and then do a pull request. I'll delete the branch once the PR is merged.

Then, when you want to make more changes, you'll create a new branch and make changes and then PR again.

As for communication, opening an issue or commenting on a pull request works great for me. You can also email me (tyson.barrett@usu.edu).

Let me know if you have any questions about any of this.