Creates a DIterator
object to iterate over the
Subset
.
new()
Method for initializing the object arguments during runtime.
DIterator$new(data, chunk.size, verbose)
data
A data.frame structure to be iterated.
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.
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.
DIterator$getNext()
A data.frame of NULL if all the data have been previously returned.
isLast()
Checks if the DIterator
object reached the end
of the data.frame
DIterator$isLast()
A logical value indicating if the end of data.frame has been reached.
finalize()
Destroys the DIterator
object.
DIterator$finalize()
clone()
The objects of this class are cloneable with this method.
DIterator$clone(deep = FALSE)
deep
Whether to make a deep clone.
Dataset