pivot_longer

Pivot longer

Lengthens data, increasing the number of rows and decreasing the number of columns.

Parameters

Returns

The pivoted DataFrame.

Examples

pivot_longer(df, $A, $B, names_to = "name", values_to = "value")