title: R Error in unique.default(x) : unique() applies only to vectors when using ddply
body: <p>I have to get the final data frame using ddply of the package plyr. Here is   the code:</p>
  
  <pre><code>POI_instances = ddply(.data = POI_proximity, .variables = c("owner","deviceid","date"), .fun = function(df){data.frame(min_time = min(df$loc_ts),max_time = max(df$loc_ts))})
  </code></pre>
  
  <p>Basically, I am trying to subset the given data frame "POI_proximity" into the final data set "POI_instances" by applying function given in the third argument.</p>
  
  <p>But I am getting the error: </p>
  
  <h2>R Error in unique.default(x) : unique() applies only to vectors</h2>
  
  <p>I did tried <a href="https://stackoverflow.com/questions/16681770/r-error-in-unique-defaultx-unique-applies-only-to-vectors">already asked</a> but didn't get the solution. Any Help Possible?</p>