FIterator: Iterator over a file.

FIteratorR Documentation

Iterator over a file.

Description

Creates a FIterator object to iterate over high dimensional files.

Details

Use HDDataset class to ensure the creation of a valid FIterator object.

Methods

Public methods


Method new()

Method for initializing the object arguments during runtime.

Usage
FIterator$new(config.params, chunk.size, verbose)
Arguments
config.params

A list of configuration options.

chunk.size

An integer value indicating the size of chunks taken over each iteration. By default chunk.size is defined as 10000.

verbose

A logical value to specify if more verbosity is needed.


Method getNext()

Gets the next chunk of data. Each iteration returns the same instances (data.frame rows) as chunk.size. However, if remaining data if less than chunk size, all the remaining data is returned. Conversely, NULL when there is no more pending data. By default chunk.size is defined as 10000.

Usage
FIterator$getNext()
Returns

A data.frame of NULL if all the data have been previously returned.


Method isLast()

Checks if the FIterator object reached the end of the data.frame

Usage
FIterator$isLast()
Returns

A logical value indicating if the end of data.frame has been reached.


Method finalize()

Destroys the FIterator object.

Usage
FIterator$finalize()

Method clone()

The objects of this class are cloneable with this method.

Usage
FIterator$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Dataset


D2MCS documentation built on Aug. 23, 2022, 5:07 p.m.