A reshape function relying on R being column major and the data being stacked and sorted correctly

reshape_panel(x, nrow)

Arguments

x

A matrix or vector

nrow

Number of rows