Statis...anguage(3pm)

πŸ’– Statistics::R::REXP::Language πŸ’–

okay bestie, so this is a User Contributed Perl Documentation page β€” that's the manual name, cute β€” and the whole thing is about Statistics::R::REXP::Language, a Perl module. yes it's a mouthful, we're gonna get through it together 🫢


✨ NAME ✨

Statistics::R::REXP::Language β€” an R language vector πŸ’…


🌸 VERSION 🌸

version 1.0002


πŸŽ€ SYNOPSIS πŸŽ€

like, here's the vibe in code form:

use Statistics::R::REXP::Language

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

so you build a language vector out of a Symbol (the function being called) plus a Double (the args), and then you just print $vec->elements. slay. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so an object of this class is an R language vector β€” its "LANGSXP" type, iykyk. these objects represent calls, like model formulae and stuff. the first element is a reference to the function being called, and everything after it is the actual arguments of the call. 🫢

and if the arguments have names? those get recorded in the 'names' attribute (which is itself a Statistics::R::REXP::Character vector), and any unnamed argument just gets the name ''. but listen β€” if no arguments were named at all, then the language object won't even have a defined 'names' attribute. no cap.


πŸ‘‘ METHODS πŸ‘‘

"Statistics::R::REXP:Language" inherits from Statistics::R::REXP::Vector, with one extra rule: its first element has to be a Statistics::R::REXP::Symbol or another "Language" instance. try to make a Language that doesn't follow that rule and it will raise an exception. the audacity would be punished fr fr 😭

  • sexptype β€” the SEXPTYPE of language vectors is "LANGSXP". that's it, that's the whole thing πŸ’…
  • to_pl β€” the Perl value of the language vector is an array reference to the Perl values of its "elements". basically it's the same as map {$_-"to_pl}, $vec->elements. iconic.

πŸ’€ BUGS AND LIMITATIONS πŸ’€

  • Classes in the "REXP" hierarchy are intended to be immutable. please, do NOT try to change their value or attributes. hands off, bestie πŸ™ˆ
  • There are no known bugs in this module. Please see Statistics::R::IO for bug reporting.

🌈 SUPPORT 🌈

See Statistics::R::IO for support and contact information. that's where the help lives 🫢


⭐ AUTHOR ⭐

Davor Cubranic <cubranic@stat.ubc.ca>


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 perl v5.34.0, dated 2022-02-10, from Statis...anguage(3pm) β€” go forth and call functions responsibly βœ¨πŸ’–πŸŒΈ