UserGuide BioStat Prime Help

Reshape Data from Wide to Long Format

Reshape wide to long option takes a wide dataset and converts it to a long dataset by converting columns into key value pairs, Pivot_longer takes multiple columns and collapses into key-value pairs, duplicating all other columns as needed. User can use pivot_longer() when user notices that he has columns that are not variables.

User can choose the variables to reshape or alternately choose the variables not to reshape from wide dataset to long dataset. In the latter case, all remaining variables will be reshaped into column(s).

Reshape wide to long
Last modified: 01 October 2025