title: How to write raw type / bytes to stdout?
body: <p>I am struggling for quite some time with outputting a raw type to standard output.
  Here is what I tried and did not work the desired way:</p>
  
  <pre><code>r &lt;- as.raw(c(0x41, 0x00, 0x43)) # r = "A\0C"
  cat(rawToChar(r)) # displays warning and skips data after NULL (outputs "A")
  cat(r) # outputs "41 00 43"
  writeBin(r, stdout()) # error: can only write to binary connection
  </code></pre>
  
  <p>I am looking for a way to get all three bytes / characters printed to stdout.</p>