Statis...ression(3pm)

✨ Statistics::R::REXP::Expression β€” the manual, but make it make sense ✨

okay so bestie, you found the page πŸ’– this is Statis...ression(3pm) from the User Contributed Perl Documentation, and it's genuinely a cute one, i promise. let's get into it 🫢


🌸 NAME 🌸

Statistics::R::REXP::Expression β€” it's an R expression vector, no cap πŸ’…


🌈 VERSION 🌈

version 1.0002 ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

use Statistics::R::REXP::Expression

# Representation of the R call C<expresson(1 + 2))>:
my $vec = Statistics::R::REXP::Expression->new([
    Statistics::R::REXP::Language->new([
        Statistics::R::REXP::Symbol->new('+'),
        Statistics::R::REXP::Double->new([1]),
        Statistics::R::REXP::Double->new([2])
])]);
print $vec->elements;

like… look at her. building a whole R call out of pieces and then printing the elements. main character energy fr fr πŸ‘‘


πŸ’œ DESCRIPTION πŸ’œ

so an object of this class represents an R expression vector, aka "EXPRSXP" πŸŽ€ these objects hold a list of calls, symbols, etc. β€” like, for example, the stuff you get back when you call the R function "parse" or "expression" 🌸


πŸŽ€ METHODS πŸŽ€

"Statistics::R::REXP:Expression" inherits from Statistics::R::REXP::List, and lowkey it adds no restrictions on the value of its elements. free spirit. no notes ✨

⭐ sexptype

the SEXPTYPE of expressions is "EXPRSXP" πŸ’… that's the whole thing. iconic.

πŸ“ to_pl

the Perl value of the expression vector is an array reference to the Perl values of its "elements" 🌈 (so basically it's equivalent to "map {$_-"to_pl}, $vec->elements>".)

and here's the lil plot twist β€” unlike List, elements that are atomic vectors of length 1 are still represented as a one-element array reference, rather than as scalar values πŸ‘€ so don't get caught slippin on that one.


πŸ’€ BUGS AND LIMITATIONS πŸ’€

the classes in the "REXP" hierarchy are intended to be immutable. please do not try to change their value or attributes πŸ™ˆ like, they said what they said. respect the boundaries bestie.

there are no known bugs in this module. for bug reporting, please see Statistics::R::IO 🫢


🌸 SUPPORT 🌸

see Statistics::R::IO for support and contact information πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

Davor Cubranic <cubranic@stat.ubc.ca> β€” the author, the moment, the legend ✨


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 vibe check, bestie πŸŽ€ this page came to you courtesy of perl v5.34.0, dated 2022-02-10, and filed under Statis...ression(3pm) β€” go forth and slay your expression vectors πŸ’…βœ¨πŸ¦‹