Statis...:Vector(3pm)
π Statistics::R::REXP::Vector β the R vector bestie π
okay so real talk, this is the Statistics::R::REXP::Vector page from the Perl docs (section 3pm, user contributed, iykyk) and it's literally all about representing an R vector in Perl land. sit down, get comfy, we're doing this π«Ά
β¨ VERSION β¨
version 1.0002 β that's the one, that's the era we're in π
π SYNOPSIS π
like, here's the vibe in code form:
use Statistics::R::REXP::Vector;
# $vec is an instance of Vector
$vec->does('Statistics::R::REXP::Vector');
print $vec->elements;
see how $vec is an instance of Vector and then we just... ask it for its elements? iconic behavior fr fr β¨
π¦ DESCRIPTION π¦
so an object of this class is the Perl-side glow-up of an R vector. but here's the tea bestie: you cannot directly instantiate this class. like, it will straight up die if you call new on it π. why? because it's a base abstract class β it's the blueprint, not the building. the actual concrete subclasses are the ones that represent specific types of vectors, like numeric or list. so you don't date the abstract class, you date its subclasses, periodt π
π METHODS π
Statistics::R::REXP::Vector inherits from Statistics::R::REXP. so everything good from the parent? already in the group chat.
π ACCESSORS π
elementsβ hands you an array reference to the vector's elements. that's it, that's the whole job, and it does it beautifully πto_plβ the Perl value of the language vector, which is an array reference to the Perl values of itselements. (aka it's equivalent tomap {$_-"to_pl}, $vec->elements>.) yeah the original text really does have that quote situation going on in there, we keep it exactly as-is, no cap πtypeβ a human-friendly description of the vector type (like"double"vs."list"). and if you want the true R type instead of the cute nickname? go usesexptype. two different queens, two different jobs π
π BUGS AND LIMITATIONS π
- the classes in the
REXPhierarchy are intended to be immutable. so please, bestie, do not try to change their value or attributes. they said what they said and they're not changing for you π - there are no known bugs in this module. for bug reporting, go look at Statistics::R::IO. they're handling it π«Ά
πΈ SUPPORT πΈ
for support and contact info, see Statistics::R::IO. that's the mutuals you hit up π
π AUTHOR π
Davor Cubranic <cubranic@stat.ubc.ca> β the legend, the main character who wrote this β¨
π COPYRIGHT AND LICENSE π
this software is Copyright (c) 2017 by University of British Columbia.
and it's free software, licensed under:
The GNU General Public License, Version 3, June 2007
so yeah, free as in freedom, go wild (responsibly) π
and that's the whole page bestie!! this was perl v5.34.0, dated 2022-02-10, and honestly? it ate. no crumbs. go forth and vector responsibly πβ¨π¦
π¦ 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