Modified DataToMatrix to use reshape2, rather than a for loop. Asymptotically, appears to be a speedup of at least 3 orders of magnitude.