Tidyr: New spread-gather name pair ideas

Created on 26 Sep 2018  路  6Comments  路  Source: tidyverse/tidyr

  • widen + lengthen
  • elongate + broaden
  • stretch + compress
  • ravel + unravel
  • cast + melt
pivoting

Most helpful comment

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?

All 6 comments

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?

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

"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?

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

collect + disperse

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

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

strengejacke picture strengejacke  路  8Comments

yuanwxu picture yuanwxu  路  3Comments

moodymudskipper picture moodymudskipper  路  5Comments

andrewpbray picture andrewpbray  路  8Comments

jennybc picture jennybc  路  5Comments