Rserve::REXP::Logical - an R logical vector
use Rserve::REXP::Logical
my $vec = Rserve::REXP::Logical->new([ 1, '', 'foo', undef ]);
print $vec->elements;
An object of this class represents an R logical vector (LGLSXP
).
Rserve::REXP:Logical
inherits from Rserve::REXP::Vector, with the added restriction that its elements are boolean (true/false) values. Elements have value 1 or 0, corresponding to TRUE
and FALSE
, respectively, while missing values (NA
in R) have value undef
.
SEXPTYPE of logical vectors is LGLSXP
.