get_points: Get Points from a Data Stream Generator

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/DSD.R

Description

Gets points from a DSD object.

Usage

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

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 avaialable (possibly zero) points are returned.

...

Additional parameters to pass to get_points() implementations.

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().

Value

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

Author(s)

Michael Hahsler

See Also

DSD

Examples

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

stream documentation built on June 2, 2018, 9:08 a.m.