title: How to convert a dataframe or numeric object into a forecast object in R?
body: <p>I am trying to compare the forecasts from R forecast package with the forecast from R Facebook Prophet package. </p>
  
  <p>the forecast package comes with a convenient autoplot function, which seems to work only with objects from the class forecast. </p>
  
  <p>When I try to plot the forecast generated by Prophet, I get the following error: </p>
  
  <pre><code>&gt; autoplot(forecast$yhat)
  Error: Objects of type numeric not supported by autoplot.
  </code></pre>
  
  <p>How to a convert a data frame or a vector into a forecast object that can then be displayed using the autoplot function? </p>