Description Arguments Value Declaration Definition Examples
Converts an Rbyte (unsigned char) to a SEXP object that represents an R
length one raw vector.
x | 
 an Rbyte value.  | 
A SEXP object, namely a length one (one byte) raw vector.
1  | SEXP Rf_ScalarRaw(Rbyte x);
 | 
In Rinternals.h.
1 2 3 4 5 6  | 
In Rinlinedfuns.h.
1 2 3 4 5 6 7 8 9  | # Convert a C unsigned char to an R length one raw vector
asterisk_byte <- inline::cfunction(NULL,
 " Rbyte x = '*'; // '*' is 42 in decimal, 2a in hexadecimal.
   SEXP y;
   y = PROTECT(Rf_ScalarRaw(x));
   UNPROTECT(1);
   return y;
 ")
asterisk_byte()
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.