Statis...O::Base(3pm)
β¨ Statis...O::Base(3pm) β¨
okay bestie, welcome to the Perl side of things π
this one's a page from the User Contributed Perl Documentation set, and it's all about Statistics::R::IO::Base β the little abstract queen that other R-file-reading classes are built on top of. let's get into it π«Ά
πΈ NAME πΈ
Statistics::R::IO::Base β the common object methods for processing R files. it's the shared glue, the group chat everyone's in, the base energy π
π VERSION π
version 1.0002 β that's the one, no cap β¨
π¦ SYNOPSIS π¦
use Statistics::R::IO::Base;
# $f is an instance of Base
$f->does('Statistics::R::IO::Base');
my $var = $rds->read;
$f->close;
see? lowkey simple. you make one, you check it does the thing, you read it, you close it. main character pipeline fr π
π DESCRIPTION π
so like, an object of this class is literally just a handle to an R-related file. that's it, that's the vibe.
BUT β and this is the important part, bestie β you cannot directly instantiate this class. if you call new on it, it will die. it said "not me being instantiated directly π". because it's intended to be a base abstract class, and the actual work gets done by concrete subclasses that parse specific types of files, like RDS or RData. it's giving "I'm the blueprint, not the house" ποΈβ¨
π₯ METHODS π₯
π§ CONSTRUCTOR π§
new $filenameβ the single-argument constructor! you hand it a scalar with the name of the R file, and it immediately opens that file for reading usingIO::File. if the file isn't readable, the method raises an exception β so yes, it will yell at you, and honestly? deserved πnew ATTRIBUTE_HASH_OR_HASH_REFβ you can also pass the constructor's arguments as a hash or a hash reference, specifying the values of the object attributes. in this case that means'fh', and for that you can use any subclass ofIO::Handle. flexibility? iconic π
β ACCESSORS β
fhβ a file handle to the data being parsed, stored as a reference to theIO::Handle. it's the lil doorway to your file πͺπ
π METHODS π
readβ reads the contents of the filehandle and returns aStatistics::R::REXP. give it a read, get an REXP back. slay β¨closeβ closes the object's filehandle. and plot twist: this method is automatically invoked when the object is destroyed. so it's got your back even when you forget π«Ά
π BUGS AND LIMITATIONS π
instances of this class are intended to be immutable. please do not try to change their value or attributes. it said "I am who I am, periodt" π ββοΈβ¨
there are no known bugs in this module. for bug reporting, please see Statistics::R::IO. (yes, go tell the parent class, not this one π)
πΈ SUPPORT πΈ
see Statistics::R::IO for support and contact information. that's where the help lives, bestie π«Ά
π AUTHOR π
Davor Cubranic <cubranic@stat.ubc.ca> β thank you for your service, legend π
π 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
okay that's the whole page, no notes, ate and left no crumbs π₯
and a lil sign-off for you: this was perl v5.34.0, dated 2022-02-10, from the Statis...O::Base(3pm) manual. bye bestie, go read some R files πβ¨π¦
π¦ 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