Rserve::REXP::Raw - an R raw vector
use Rserve::REXP::Raw
my $vec = Rserve::REXP::Raw->new([ 1, 27, 143, 33 ]);
print $vec->elements;
An object of this class represents an R raw vector (RAWSXP
). It is intended to hold the data of arbitrary binary objects, for instance bytes read from a socket connection.
Rserve::REXP:Raw
inherits from Rserve::REXP::Vector, with the added restriction that its elements are byte values and cannot have missing values. Trying to create a raw vectors with elements that are not numbers in range 0-255 will raise an exception.
SEXPTYPE of raw vectors is RAWSXP
.