title: how to split a vector with mixed variables into two separate vectors in R
body: <p>I extracted a mixed variable which includes both numeric and string values from a data file using strsplit function. I ended up with a variable just as seen below:</p>
  
  <pre><code>&gt; sample3
  
  [[1]]
  [1] "1200" "A"  
  
  [[2]]
  [1] "1193" "A"  
  
  [[3]]
  [1] "1117" "B"  
  
  [[4]]
  [1] "5663" 
  
  [[5]]
  [1] "7003" "C" 
  
  [[6]]
  [1] "1205" "A"  
  
  [[7]]
  [1] "2100" "D"  
  
  [[8]]
  [1] "1000" "D"  
  
  [[9]]
  [1]  "D" 
  
  [[10]]
  [1] "1000" "B"
  </code></pre>
  
  <p>I need to split this into two variables/vectors(or convert to a two-columned matrix). I tried to use unlist(sample3) code then put the all values into a matrix with ncol=2 however since there are some missing data points the result is not correct when I use this way. I think I need to solve missing data issue before putting into a two columned matrix. Does anyone have any idea on this issue? Any help will be greatly appreciated.</p>