Often I need to transform several columns of data into rows of aligned values in a matrix, for multivariate analysis. So randomly ordered values in the same sample are arranged/aligned into the corresponding column. How can I conduct this automatically?