title: Convert hexadecimal character vector to raw vector in R
body: <p>I am trying to convert a hexadecimal character vector shown below into a raw vector,</p>
  
  <pre><code>"58" "0a" "00" "00" "00" "02" "00" "03" "02" "00" "00" "02" "03" "00" "00" "00" "03" "13" "00" "00"
  </code></pre>
  
  <p>I have tried it using this code,</p>
  
  <pre><code>as.raw(hexvec)
  </code></pre>
  
  <p>But, this gives me the following result,</p>
  
  <pre><code>3a 00 00 00 00 02 00 03 02 00
  Warning messages:
  1: NAs introduced by coercion 
  2: out-of-range values treated as 0 in coercion to raw
  </code></pre>
  
  <p>What I want is the same vector in Raw type vector(as returned by serialize function). Can anyone help me with this?</p>