Statis...R::REXP(3pm)
β¨ NAME β¨
Statistics::R::REXP β the base class for R objects, aka "SEXP"s π
okay so real quick, this page lives in the User Contributed Perl Documentation and it's filed under Statis...R::REXP(3pm) in case you were like "wait which page am I on". Bestie, you're in the right place.
πΈ VERSION πΈ
version 1.0002 β iconic, we stan a numbered release β¨
π SYNOPSIS π
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;
π¦ DESCRIPTION π¦
so an object of this class is literally a native R object, periodt. but here's the tea: you cannot instantiate this class directly β it will die if you call new on it π β because it's meant to be an abstract base class, with concrete subclasses doing the actual representing of specific object types. main character energy, but it refuses to be the main character itself. the way that works.
An R object has a value and an optional set of named attributes, which are themselves R objects (yes bestie, R objects inside R objects, it's giving recursion π). And because the meaning of 'value' depends on the actual object type β think a vector vs. a NULL, in R terminology β REXP does not give you a generic value accessor method. lowkey makes sense. individual subclasses will typically have one though, so go check those π
π METHODS π
attributes
Returns a hash reference to the object's attributes. cute little bag of extras π
sexptype
Returns the name of the corresponding R SEXP type, exactly as listed over in SEXPTYPE at http://cran.r-project.org/doc/manuals/r-release/R-ints.html#SEXPTYPEs π₯
to_pl
Returns the Perl representation of the object's value. This one is an abstract method β so go look at the concrete subclasses to find out what value a specific object type actually returns, and also how to access the R (-ish) value of the object, if such a thing even makes sense. no cap.
is_null
Returns TRUE if the object is an R NULL object. In REXP's class hierarchy, that's only the case for Statistics::REXP::Null. just the one, bestie π«Ά
is_vector
Returns TRUE if the object is an R vector object. In REXP's class hierarchy, that's only the case for Statistics::REXP::Vector and its descendants. the whole little vector family π
inherits CLASS_NAME
Returns TRUE if the object is an instance of the R S3-style class CLASS_NAME, doing it the exact same way the R function base::inherits does β you can peek at it at http://stat.ethz.ch/R-manual/R-patched/library/base/html/class.html. same vibe, same energy π
π₯ OVERLOADS π₯
REXP overloads the stringification, eq and ne methods; and subclasses go even further and specialize for their own types if necessary. obsessed. β¨
π BUGS AND LIMITATIONS π
Classes in the REXP hierarchy are intended to be immutable. Please do not try to change their value or attributes. fr fr, hands off the value π
More is_* accessors should be added. (noted π)
There are no known bugs in this module. Please see Statistics::R::IO for bug reporting β that's where you take the drama.
π«Ά SUPPORT π«Ά
See Statistics::R::IO for support and contact information. they got you π
π AUTHOR π
Davor Cubranic <cubranic@stat.ubc.ca> β king behavior, thank you for your service π
π COPYRIGHT AND LICENSE π
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
and that's the whole page, bestie!! π
β¨ this was Statis...R::REXP(3pm) from perl v5.34.0, dated 2022-02-10 β go forth and read your RDS files, iykyk π¦πΈπ
π¦ where this page comes from
- debian bookworm: libstatistics-r-io-perl 1.0002-2 Β· GPL-3.0-only
- debian trixie: libstatistics-r-io-perl 1.0002-2 Β· GPL-3.0-only
- ubuntu jammy: libstatistics-r-io-perl 1.0002-2 Β· GPL-3.0-only
- ubuntu noble: libstatistics-r-io-perl 1.0002-2 Β· GPL-3.0-only
- ubuntu resolute: libstatistics-r-io-perl 1.0002-2 Β· GPL-3.0-only
- ubuntu stonking: libstatistics-r-io-perl 1.0002-2 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms