title: Convert multiple categorical variables to factors in R
body: <p>Salutations </p>
  
  <p>Currently creating a neural network, and need to have the data structured properly. For one of the data columns, there is string data that needs to be converted to a numeric. Only problem is, is that the string data in each row is  example <code>QWERTGCD, AWERTKRD, TWERTKRR'</code>etc. There is over 1000 lines of rows, each one having the same or different strings like in the example posted. I dont know how to convert multiple strings, into categorical data on this scale. Same thing goes for the labels partion.  </p>
  
  <p>So far I have this to start with </p>
  
  <p><code>dataset$Box = as.numeric(factor(dataset$Box, levels = c(), labels = c()))</code> </p>
  
  <p>Not sure if I am overthinking this, but I cant figure how exactly to input the levels and tables without painstakingly going through the data, and inputing in myself. </p>
  
  <p>Here's an example of the data that being worked with.</p>
  
  <p><code>B,11979,13236,1261,3,QWERTGCD,1 
   B,475514,476069,559,33,QWERTOOD,1
   C,65534,65867,337,1,QWERAEER,1
   C,73738,74657,923,2,AWERTWED,1</code></p>
  
  <p>Thanks </p>