title: Error in using prewhiten function in r
body: <p>I am trying to use prewhiten function(TSA package) in my time series forecasting model. But i am getting below error:</p>
  
  <pre><code>Error in UseMethod("filter_") : no applicable method for 'filter_' applied to
  an object of class "c('double', 'numeric')"
  </code></pre>
  
  <p>I have no clue about this error. For example if i try to run example given in TSA package pdf(page number 50). I get the same error. Below is the code quoted from the same pdf:</p>
  
  <pre><code>   data(milk)
     data(electricity)
     milk.electricity=ts.intersect(milk,log(electricity))
     plot(milk.electricity,yax.flip=TRUE,main='')
     ccf(as.numeric(milk.electricity[,1]),as.numeric(milk.electricity[,2]),
     main='milk &amp; electricity',ylab='CCF')
     me.dif=ts.intersect(diff(diff(milk,12)),diff(diff(log(electricity),12)))
     prewhiten(as.numeric(me.dif[,1]),as.numeric(me.dif[,2]),
     ,ylab='CCF')
  </code></pre>
  
  <p>Can anyone please help me with this error? Thanks!</p>