title: How do I categorize my data for a datamining procedure?
body: <p>I am doing a data mining procedure, using the <code>apriori</code> function. This function only works on categorical data, without values but only text. My dataset fulfills these requirements, as I have five categorial variables, without numerical values but only text (so the variable 'sex' is categorized into 'female' and 'male')</p>
  
  <p>If I now try the <code>apriori()</code> function, I get the following error:</p>
  
  <pre><code>apriori(data)
  </code></pre>
  
  <p>Error in <code>asMethod(object)</code> : </p>
  
  <pre><code>  column(s) 1, 2, 3, 4, 5 not logical or a factor. Use as.factor or categorize first.
  </code></pre>
  
  <p>Although my data looks categorical, R does not get that it is. How do I use for instance the as.factor function to categorize my data properly, so that the apriori function works?</p>