Learn R Programming

stream (version 1.5-1)

get_points: Get Points from a Data Stream Generator

Description

Gets points from a DSD object.

Usage

get_points(x, n = 1, outofpoints = c("stop", "warn", "ignore"), ...)

Value

Returns a matrix of x$d columns and n rows.

Arguments

x

The DSD object.

n

Request up to $n$ points from the stream.

outofpoints

Action taken if less than $n$ data points are available. The default is to stop with an error. For warn and ignore all available (possibly zero) points are returned.

...

Additional parameters to pass to get_points implementations.

Author

Michael Hahsler

Details

Each DSD object has a unique way for returning data points, but they all are called through the generic function, get_points. This is done by using the S3 class system. See the man page for the specific DSD class on the semantics for each implementation of get_points.

See Also

DSD

Examples

Run this code

stream <- DSD_Gaussians()
get_points(stream, 100)

Run the code above in your browser using DataLab