stream (version 1.2-3)

DSD_ScaleStream: Scale a Stream from a DSD

Description

Make an unscaled data stream into a scaled data stream.

Usage

DSD_ScaleStream(dsd, center=TRUE, scale=TRUE, n=1000, reset=FALSE)

Arguments

dsd
A object of class DSD that will be scaled.
center, scale
logical or a numeric vector of length equal to the number of columns used for centering/scaling (see function scale).
n
The number of points used to creating the centering/scaling
reset
Try to reset the stream to its beginning after taking n points for scaling.

Value

An object of class DSD_ScaleStream (subclass of DSD_R, DSD).

Details

scale_stream() estimates the values for centering and scaling (see scale in base) using n points from the stream.

See Also

DSD, reset_stream, scale in base,

Examples

Run this code
stream <- DSD_Gaussians(k=3, d=3)
plot(stream)

# scale stream using 100 points
stream_scaled <- DSD_ScaleStream(stream, n=100)
plot(stream_scaled)

Run the code above in your browser using DataLab