title: Conversion of dataframe into a realRatingMatrix in R
body: <p>I'm trying to convert a data-frame that contains three columns username, itemnumber or itemID and the rating. The datatype of the three columns are mentioned below. </p>
  
  <pre><code>&gt;             userID          itemid         rating
                 &lt;chr&gt;           &lt;int&gt;          &lt;dbl&gt;
  </code></pre>
  
  <p>I found the method to convert a data-frame into a realRatingMatrix when all the columns are numeric. However, I was unable to find a function to convert this data-frame which contains both character and numeric datatype.
  Can someone please suggest any solution to convert a data-frame to realRatingMatrix.</p>