to_matrix function

Build a Matrix from Measure and ID Variables