Introduction
pivot_longer helps you turn wide tables into long tables, making data easier to analyze and visualize.
You have a table with many columns representing similar data points and want to stack them into rows.
You want to prepare data for plotting where each row is one observation.
You need to simplify a dataset with repeated column patterns into a tidy format.
You want to convert survey results from multiple columns into a single column with values.
You want to reshape data to use functions that expect long format input.