concept pivot_longer in category R
appears as: pivot_longer, pivot_longer

This is an excerpt from Manning's book Exploring Data with R.
4.2.2 Addressing Untidyness by Using the pivot_longer() Function
Let’s start to transform winniweather into a tidy dataset by first addressing the temp* columns with tidyr’s pivot_longer() function. This function takes multiple columns and collapses them into key-value pairs (making the resulting table longer, with more rows). Put another way, the column names become values in the new key column and the values in each of the targeted columns go into the value column (we can supply our own names for the new key and value columns). It’s far better to show than tell in this case. Listing 4.2 demonstrates how we would use pivot_longer() to make this table more tidy.