title: Error in unique.default(x) : unique() applies only to vectors in R
body: <pre><code>retail_sorted &lt;- retail[order(retail$customer_code),]
  library(plyr)
  itemList &lt;- ddply(retail,c("customer_code","date"), 
                     function(df1)paste(df1$article_batch, 
                     collapse = ","))
  </code></pre>
  
  <p>when i am trying to load this it shows 'Error in unique.default(x) : unique() applies only to vectors' </p>
  
  <p>can anyone help me out..</p>