GerkeLab / gerkelab-com

Website source for gerkelab.com
http://www.gerkelab.com
0 stars 3 forks source link

Spread and gather #20

Open gadenbuie opened 5 years ago

gadenbuie commented 5 years ago

kierisi: there's a pretty large discrepancy between how well I think I know spread() and gather() and how well I actually know spread() and gather() 😬
https://twitter.com/kierisi/status/1056637253483720704

Yup this is exactly the intuition I developed! Really helps to think of have and want. Only addition I might propose is if I want to gather all but one column you can just do gather (data,wantkey,wantval, -column that shouldn't be gathered) https://twitter.com/VizMonkey/status/1056723714384019458

Me guessing if gather() or spread() is the right choice. Literally every time I need it. #rstats #tidyverse
https://twitter.com/CedScherer/status/1049289807380320266

Spread and gather as in spreading butter on bread and gathering leaves into a pile: https://twitter.com/WeAreRLadies/status/1054742083607642112

I can't remember the difference between spread() and gather() to save my life. So I decided to rename them instead 😂🤓
https://twitter.com/Emil_Hvitfeldt/status/1054144920141746177

tgerke commented 5 years ago

also worth giving historical context against reshape2 based functions e.g. melt/cast, and/or dare I suggest even older aggregate style solutions with reshape for us dinosaurs?