Statis...:RData(3pm)

πŸ’– Statistics::R::IO::RData β€” the bestie guide πŸ’–

okay so real talk, this is the Statistics::R::IO::RData page from the User Contributed Perl Documentation, section 3pm, and it's literally all about giving you object methods for RData files. yes queen, we're parsing R serialization formats today. πŸŽ€


✨ NAME ✨

Statistics::R::IO::RData β€” supply object methods for RData files πŸ¦‹


🌸 VERSION 🌸

version 1.0002 β€” that's the one, no cap πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

bestie here's the whole vibe in code, copy it exactly:

use Statistics::R::IO::RData;

my $rdata = Statistics::R::IO::RData->new('.RData');
my %r_workspace = $rdata->read;
while (my ($var_name, $value) = each %r_workspace) {
    print $var_name, $value;
}
$rdata->close;

like, you make the object, you read it, you loop through your workspace hash, you close it. main character energy, start to finish. πŸ‘‘


πŸ’œ DESCRIPTION πŸ’œ

Statistics::R::IO::RData is giving you an object-oriented interface for parsing RData files. periodt.

so what even is an RData file? it stores a serialization of a collection of named objects β€” typically, like, a whole workspace. these files get created in R using the save function, and they're typically named with the .RData file extension. πŸ“

and psa, the contents of your R workspace can also be saved automatically on exit to the file named .RData, which is by default automatically read in on startup. the way that it just handles itself?? iconic. ✨


πŸ”₯ METHODS πŸ”₯

Statistics::R::IO::RData inherits from Statistics::R::IO::Base, and it provides an implementation for the read method that parses RData files. family business, we love to see it. 🫢

  • read β€” reads the contents of the filehandle and returns a hash whose keys are the names of objects stored in the file, with the corresponding values as Statistics::R::REXP instances. so you get back a whole hash of name β†’ Statistics::R::REXP, chef's kiss 😭

πŸ’€ BUGS AND LIMITATIONS πŸ’€

There are no known bugs in this module. (not me bragging but okay we ate πŸ’…) Please see Statistics::R::IO for bug reporting.


🌈 SUPPORT 🌈

See Statistics::R::IO for support and contact information. they got you, bestie 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Davor Cubranic <cubranic@stat.ubc.ca> β€” legend behavior, fr fr ✨


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
legal stuff bestie, don't skip it β€” GPL v3, June 2007, that's the whole vibe. πŸ’œ

and that's a wrap!! this page came to you courtesy of perl v5.34.0, dated 2022-02-10, and it lives in section 3pm of the User Contributed Perl Documentation. slay, bye bestie πŸ’…βœ¨πŸ¦‹