This tutorial provides you with the basic understanding of the four fundamental functions of data tidying that tidyr provides:
gather() makes “wide” data longer
spread() makes “long” data wider
separate() splits a single column into multiple columns
unite() combines multiple columns into a single column
Has several interactive examples, including how to
Split-apply-combine data analysis and the summarize() function
Reshaping with pivot_wider() and pivot_longer()
R provides a variety of methods for reshaping data prior to analysis.
Data Reshaping in R is about changing the way data is organized into rows and columns.