title: Dataframe for Apriori algorithm | Market Basket Analysis in R
body: <p>I will be grateful if somebody could tell me what am I missing in my code. I am trying to find association rules using apriori algorithm (arules package) in R. I am using R-3.2 version for MacOSX.</p>
  
  <p>The problem arises when I am reading the dataset from a csv format into a transactions class object. I am using the following piece of code - </p>
  
  <pre><code>&gt;Transac1 &lt;- read.transactions(file="transactions.csv", format = "basket", sep=";", rm.duplicates=TRUE)
  </code></pre>
  
  <p>On inspecting the data frame, I am observing that the first element in all the rows is missing.</p>
  
  <pre><code>&gt;inspect(Transac1[1:5])
  
  items        
  1  {,           
  Milk}    
  2  {,           
  Shoes}    
  3  {,           
  Talc}   
  4  {,           
  Cable}     
  5  {,           
  Shoe Polish, Talc}   
  </code></pre>
  
  <p>I am able to generate association rules in the end, but I think those are not correct (just because of these blank elements). Can anyone understand and tell me what is possibly the reason for this? The file that I use for reading has data in the requisite format for apriori algorithm.</p>
  
  <p>Any leads would be highly appreciated.</p>