title: R equivalent for numpy 'frombuffer'
body: <p>To decode a binary answer from a socket connection in Python I would do : </p>
  
  <pre><code>import numpy as np
  
  answer= b"\x80\x8eaS\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x80\x8eaS\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00"
  
  datatype = [('da_0', '&lt;i8'), ('i8_1', '&lt;i8')]
  
  np.frombuffer(answer, datatype)
  </code></pre>
  
  <p>which outputs</p>
  
  <pre><code>&gt;&gt;&gt;array([(1398902400, 1), (1398902400, 1)], 
    dtype=[('da_0', '&lt;i8'), ('i8_1', '&lt;i8')])
  </code></pre>
  
  <p>I have been battling with the unpack() function (from {pack}) in R to reproduce the same result but unsuccessfully until now. </p>
  
  <p>Any idea would be much appreciated ! </p>