DOKK / manpages / debian 12 / libstatistics-r-io-perl / Statistics::R::IO::Base.3pm.en
Statistics::R::IO::Base(3pm) User Contributed Perl Documentation Statistics::R::IO::Base(3pm)

Statistics::R::IO::Base - Common object methods for processing R files

version 1.0002

    use Statistics::R::IO::Base;
    
    # $f is an instance of Base
    $f->does('Statistics::R::IO::Base');
    my $var = $rds->read;
    $f->close;

An object of this class represents a handle to an R-related file. This class cannot be directly instantiated (it will die if you call "new" on it), because it is intended as a base abstract class with concrete subclasses to parse specific types of files, such as RDS or RData.

CONSTRUCTOR

The single-argument constructor can be invoked with a scalar containing the name of the R file. This file will be immediately opened for reading using IO::File. The method will raise an exception if the file is not readable.
The constructor's arguments can also be given as a hash or hash reference, specifying values of the object attributes (in this case, 'fh', for which any subclass of IO::Handle can be used).

ACCESSORS

A file handle (stored as a reference to the IO::Handle) to the data being parsed.

METHODS

Reads the contents of the filehandle and returns a Statistics::R::REXP.
Closes the object's filehandle. This method is automatically invoked when the object is destroyed.

Instances of this class are intended to be immutable. Please do not try to change their value or attributes.

There are no known bugs in this module. Please see Statistics::R::IO for bug reporting.

See Statistics::R::IO for support and contact information.

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
2022-02-10 perl v5.34.0