title: How to clean and re-code check-all-that-apply responses in R survey data?
body: <p>I've got survey data with some multiple-response questions like this:</p>
  
  <p>HS18 Why is it difficult to get medical care in South Africa? (Select all that apply)</p>
  
  <pre><code>1   Too expensive
  2   No transportation to the hospital/clinic
  3   Hospital/clinic is too far away
  4   Hospital/clinic staff do not speak my language
  5   Hospital/clinic staff do not like foreigners
  6   Wait time too long
  7   Cannot take time off of work
  8   None of these. I have no problem accessing medical care
  </code></pre>
  
  <p>where multiple responses were entered with commas and are recorded as different levels i.e.:</p>
  
  <blockquote>
    <p>unique(HS18)
     [1] 888     1       6       4       5       8       2       3,5     4,6     3,6     3,4     3<br>
    [13] 4,5,6   7       999     4,5     2,6     4,8     7,8     1,6     1,2,3   5,7,8   4,5,6,7 1,4<br>
    [25] 0       5,6,7   5,6     2,3     1,4,6,7 1,4,5<br>
    30 Levels: 0 1 1,2,3 1,4 1,4,5 1,4,6,7 1,6 2 2,3 2,6 3 3,4 3,5 3,6 4 4,5 4,5,6 4,5,6,7 4,6 4,8 ... 999</p>
  </blockquote>
  
  <p>This is as much a data-cleaning protocol question as an R question...I'm doing the cleaning, but not the analysis, so everything needs to be transparent and user-friendly when I pass it back...and the PI doesn't use R. Basically I'd like to split the multiples into levels and re-name them while keeping them together as a single observation...not sure how to do this, or even if it's the right approach.</p>
  
  <p>How do you generally deal with this issue? Is there an elegant way to process this for analysis in STATA (simple descriptives, regressions, odds ratios)? </p>
  
  <p>Thanks everyone!!! </p>