Last updated: May 19, 2020
pivot_longer() functions in
tidyr are the best way to convert between wide and long data. Look at these slides for a good visual summary.
ℹ️ This page is part of my knowledge base for R, the popular statistical programming language. I attempt to use idiomatic practices with the
tidyverse collection of packages as much as possible. If you have suggestions for ways to improve this code, please contact me or use the survey link below..