to_m function

Convert time series data to matrix with defined number of columns