title: How to convert data frame rows iteratively into time series object and apply auto.arima to each row
body: <p>I have the following df:</p>
  
  <pre><code>head(customerdata)
    Customer.ID Week1 Week2 Week3 week4 week5 week6 week7 week8
  1          C1   420   423   481   421   393   419   415   440
  2          C2  1325  1262  1376  1370  1484  1421  1287  1400
  3          C3   547   541   547   550   570   576   556   587
  4          C4   349   349   375   346   374   379   433   376
  5          C5   721   714   758   716   833   735   711   731
  6          C6   420   423   481   421   393   419   415   440
  </code></pre>
  
  <p>I need to convert each customer ID i.e.row into a time series object and then apply auto.arima on each row and make forecasts.</p>
  
  <p>I tried using apply fn :</p>
  
  <pre><code>apply(customerdata,1,as.ts) 
  </code></pre>
  
  <p>But this didnt work properly.</p>
  
  <p>Also is there a way where i can use tidyverse packages like purrr etc. to convert each row into ts object,then apply auto.arima using map fn, then extract error stats like MAPE and also points forecast in a data.frame.</p>
  
  <p>Help would be appreciated!!</p>