tidyverse / tidyr

Tidy Messy Data
https://tidyr.tidyverse.org/
Other
1.39k stars 420 forks source link

New spread-gather name pair ideas #498

Closed hadley closed 5 years ago

hadley commented 6 years ago
jennybc commented 6 years ago

Would you ever reconsider stack + unstack? That remains the single most intuitive word pair for me, I think.

Unlike filter(), stack is an S3 generic. Does that make this any more contemplate-able? Or after select/filter is this a "never again" thing?

hadley commented 6 years ago

I think any existing base R function is a no go, because (e.g) ?stack would never take to you the tidyr docs.

epetrovski commented 5 years ago

"widen + lengthen" would be consistent with the terminology of econometrics. A plus for people from the social sciences.

BTW, is this possibly related to #149?

albertotb commented 5 years ago

What about pivot + melt? Same terminology is used in Pandas if I'm not mistaken.

lionel- commented 5 years ago

collect + disperse

It'd be nice if the names reflected the nature of the operation in addition to its reshaping properties.

hadley commented 5 years ago

Thanks all. After some though I think the best approach is going to be use a suffix to indicate the directionality, e.g. _wide(), _long(). I'm still not sure what the core name will be but I'm currently leaning towards pivot_ and I'm likely to do some informal user testing before CRAN release.