Downsample {Streamer}R Documentation

Consumer class to down-sample data

Description

A Consumer-class to select records with fixed probability, returning a yield of fixed size. Successive calls to yield result in sampling of subsequent records in the stream, until the stream is exhausted.

Usage

Downsample(probability=0.1, sampledSize=1e6, ...)

Arguments

probability

A numeric(1) between 0, 1 indicating the probability with which a record should be retained.

...

Additional arguments, passed to the $new method of the underlying reference class. Currently unused.

sampledSize

A integer(1) indicating the number of records to return.

Methods

See Consumer Methods.

Internal Class Fields and Methods

Internal fields of this class are are described with, e.g., getRefClass("Downsample")$fields.

Internal methods of this class are described with getRefClass("Downsample")$methods() and getRefClass("Downsample")$help().

Author(s)

Martin Morgan mtmorgan@fhcrc.org

See Also

Stream

Examples

showClass("Downsample")

[Package Streamer version 1.32.1 Index]