# creating data and writing it to disk
dsd <- DSD_GaussianStatic(k=3, d=5)
write_stream(dsd, "data.txt", n=100, sep=",")
# reading the same data back (as a loop)
dsd2 <- DSD_ReadStream("data.txt", sep=",", loop=TRUE)
plot(dsd2)
dsd3 <- DSD_ScaleStream(dsd2)
plot(dsd3)
# clean up
close_stream(dsd2)
file.remove("data.txt")
Run the code above in your browser using DataLab