Data table to time series

882 Views Asked by At

I have a data table which I want to convert to a time series ts(). I am able to convert a single column one at a time but I have to convert entire table and then forecast the future values. Here is the sample data

 WeekNum 930000405 930000408 930000640 930000651 930000652 930000653 4133101312
1        1         0         0         0         3         1        10          8
2        2         0         0         0         7         3         5          4
3        3         0         3         0         7         5         8          3
4        4         0         0         0         9         1        12          6
5        5         2         0         0         3         1        14          2
6        6         2         0         0         7         2         3          6
7        7         1         1         1         9         0         7          7
8        8         0         1         0         3         2        15          4
9        9         0         0         0         7         4         6          6

Supposing that I have to get the prediction for 10th week I want to convert it to ts() and then finally use forecast() on the time series. Please help on how to convert the entire table. When I am simply using ts(data) it is just converting it but not to a time series.

0

There are 0 best solutions below