title: hex2bin in data frame
body: <p>I'm new to R and excited about all the possibilities of data management and presentation.
  Actually I have a problem and did not find any solution:</p>
  
  <p>I have built a data frame with:</p>
  
  <pre><code>require(BMS)
  n = c(1, 2, 3, 4, 5, 6, 7, 8)
  s = c("55aa55aa", "aa55aa55", "12345678", "9ABCDEF0", "55aa55aa", "aa55aa55", "12345678", "9ABCDEF0")
  df = data.frame(n, s)
  df$s &lt;- as.character(df$s)
  df
  #   n        s
  # 1 1 55aa55aa
  # 2 2 aa55aa55
  # 3 3 12345678
  # 4 4 9ABCDEF0
  # 5 5 55aa55aa
  # 6 6 aa55aa55
  # 7 7 12345678
  # 8 8 9ABCDEF0
  </code></pre>
  
  <p>Column <code>s</code> is a 32bit hex value which I want to add as the real bit string to the data frame as new column <code>sbin</code>.
  It should look like this afterwards:</p>
  
  <pre><code>df
  #   n        s                             sbin
  # 1 1 55aa55aa 01010101101010100101010110101010
  # 2 2 aa55aa55 10101010010101011010101001010101
  # 3 3 12345678 00010010001101000101011001111000
  # 4 4 9ABCDEF0 .......
  # 5 5 55aa55aa ......
  # 6 6 aa55aa55
  # 7 7 12345678
  # 8 8 9ABCDEF0
  </code></pre>
  
  <p>For conversion I like to use the "hex2bin" function out of "BMS" package.</p>
  
  <p>I tried this</p>
  
  <pre><code>lapply(df$s, hex2bin)
  # [[1]]
  #  [1] 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0
  
  # [[2]]
  #  [1] 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1
  
  # [[3]]
  #  [1] 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0
  
  # .....
  </code></pre>
  
  <p>but did not get the required output.</p>
  
  <p>In the end I would like to access each bit in the data frame rows. So I would like to get 32 vectors with 8 bits each in this example.</p>