title: Can't convert matrix in R to itemMatrix to facilitate collaborative filtering
body: <p>I have a large, sparse binary matrix in R that I want to coerce to an itemMatrix so I can perform collaborative filtering. When I run:</p>
  
  <pre><code>i &lt;- as(m, "itemMatrix")
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>Error in t(as(from, "ngCMatrix")) 
  error in evaluating the argument 'x' in selecting a method for function 't': Error in             asMethod(object) : cannot coerce 'NA's to "nsparseMatrix"
  </code></pre>
  
  <p>When I convert the original matrix to a data frame and replace the matrix in the code, I get the following error:</p>
  
  <pre><code>Error in asMethod(object) 
  can not coerce list with transactions with duplicated items
  </code></pre>
  
  <p>I double checked my dataset for missing values and find none. What could the problem be that is preventing the conversion to an itemMatrix?</p>