Base: Base class for all other classes

BaseR Documentation

Base class for all other classes

Description

Provides a basic structure for processing text files. Also provides methods for reading and writing files and objects.

Details

It provides pre-processing, processing and post-processing methods, which need to be overridden by derived classes.

The pre-processing function is called before reading a file. The process function is called for processing a given number of lines. The post processing function is called on the processed data.

Also provides methods for reading and writing text files and R objects. All class methods are private.

Methods

Public methods


Method new()

It initializes the current object. It is used to set the file name and verbose options.

Usage
Base$new(fn = NULL, lc = 100, ve = 2)
Arguments
fn

The path to the file to clean.

lc

The number of lines to read and clean at a time.

ve

The level of detail in the information messages. Reads the given file one line at a time. It runs the given pre-processing function before reading the file. It runs the given


Method clone()

The objects of this class are cloneable with this method.

Usage
Base$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


wordpredictor documentation built on Oct. 8, 2024, 5:10 p.m.