Learn R Programming

stream (version 2.0-1)

read_saveDSC: Save and Read DSC Objects

Description

Save and Read DSC objects safely (serializes the underlying data structure). This also works for streamMOA DSC objects.

Usage

saveDSC(object, file, ...)

readDSC(file)

Arguments

object

a DSC object.

file

filename.

...

further arguments.

Author

Michael Hahsler

See Also

saveRDS and readRDS.

Other DSC: DSC_Macro(), DSC_Micro(), DSC_R(), DSC_SlidingWindow(), DSC_Static(), DSC_TwoStage(), DSC(), animate_cluster(), evaluate.DSC, get_assignment(), plot.DSC(), predict(), prune_clusters(), recluster()

Examples

Run this code

stream <- DSD_Gaussians(k = 3, noise = 0.05)

# create clusterer with r = 0.05
dbstream1 <- DSC_DBSTREAM(r = .05)
update(dbstream1, stream, 1000)
dbstream1

saveDSC(dbstream1, file="dbstream.Rds")

dbstream2 <- readDSC("dbstream.Rds")
dbstream2

## cleanup
unlink("dbstream.Rds")

Run the code above in your browser using DataLab