Rserve::REXP::Complex - an R numeric vector
use Rserve::REXP::Complex;
use Math::Complex ();
my $vec = Rserve::REXP::Complex->new([ 1, cplx(4, 2), 'foo', 42 ]);
print $vec->elements;
An object of this class represents an R complex vector (CPLXSXP
).
Rserve::REXP:Complex
inherits from Rserve::REXP::Vector, with the added restriction that its elements are complex numbers. Elements that are not numbers have value undef
, as do elements with R value NA
.
SEXPTYPE of complex vectors is CPLXSXP
.