I like to replicate the reshape function in J.
reshape
For example, Stata can reshape a dataset "from wide to long". Below is their Exampl