reset_stream | R Documentation |
Resets the position in a DSD object to the beginning or, if available, any other position in the stream.
reset_stream(dsd, pos = 1)
dsd |
An object of class a subclass of DSD which implements a reset function. |
pos |
Position in the stream (the beginning of the stream is position 1). |
Resets the counter of the stream object. For example, for DSD_Memory,
the counter stored in the environment variable is moved back to 1. For
DSD_ReadCSV objects, this is done by calling seek()
on the
underlying connection.
reset_stream()
is implemented for:
DSD
DSD_MG
DSD_Memory
DSD_ReadStream
DSF
DSF_Convolve
Michael Hahsler
Other DSD:
DSD()
,
DSD_BarsAndGaussians()
,
DSD_Benchmark()
,
DSD_Cubes()
,
DSD_Gaussians()
,
DSD_MG()
,
DSD_Memory()
,
DSD_Mixture()
,
DSD_NULL()
,
DSD_ReadDB()
,
DSD_ReadStream()
,
DSD_Target()
,
DSD_UniformNoise()
,
DSD_mlbenchData()
,
DSD_mlbenchGenerator()
,
DSF()
,
animate_data()
,
close_stream()
,
get_points()
,
plot.DSD()
# initializing the objects
stream <- DSD_Gaussians()
replayer <- DSD_Memory(stream, 100)
replayer
p <- get_points(replayer, 50)
replayer
# reset replayer to the beginning of the stream
reset_stream(replayer)
replayer
# set replayer to position 21
reset_stream(replayer, pos = 21)
replayer
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.