Statistics::R::REXP(3pm) | User Contributed Perl Documentation | Statistics::R::REXP(3pm) |
Statistics::R::REXP - base class for R objects ("SEXP"s)
version 1.0002
use Statistics::R::REXP; # we usually get REXPs from an RDS file: my $rexp = Statistics::R::IO::readRDS('file.rds'); # REXPs are stringifiable say $rexp; # REXPs can be converted to the closest native Perl data type print $rexp->to_pl;
An object of this class represents a native R object. This class cannot be directly instantiated (it will die if you call "new" on it), because it is intended as a base abstract class with concrete subclasses to represent specific object types.
An R object has a value and an optional set of named attributes, which themselves are R objects. Because the meaning of 'value' depends on the actual object type (for example, a vector vs. a "NULL", in R terminology), "REXP" does not provide a generic value accessor method, although individual subclasses will typically have one.
"REXP" overloads the stringification, "eq" and "ne" methods; subclasses further specialize for their types if necesssary.
Classes in the "REXP" hierarchy are intended to be immutable. Please do not try to change their value or attributes.
More "is_*" accessors should be added.
There are no known bugs in this module. Please see Statistics::R::IO for bug reporting.
See Statistics::R::IO for support and contact information.
Davor Cubranic <cubranic@stat.ubc.ca>
This software is Copyright (c) 2017 by University of British Columbia.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007
2022-02-10 | perl v5.34.0 |