Learn R Programming

stream (version 0.1-1)

write_stream: Write a Data Stream to a File

Description

Writes points from a data stream DSD object to a file or a connection.

Usage

write_stream(dsd, file, n=100, block=100000L, 
	assignment=FALSE, sep=",", 
	col.names=FALSE, row.names=FALSE, ...)

Arguments

dsd
The DSD object that will generate the data points for output.
file
A file name or a R connection to be written to.
n
The number of data points to be written.
block
Write stream in blocks to improve file I/O speed.
assignment
Save the assignment of the points as the last column.
sep
The character that will separate attributes in a data point.
col.names
A flag that determines if column names will be output.
row.names
A flag that determines if row names will be output.
...
Additional parameters that are passed to write.table().

Value

  • There is no value returned from this operation.

See Also

write.table, DSD

Examples

Run this code
# creating data and writing it to disk
dsd <- DSD_GaussianStatic(k=3, d=5)
write_stream(dsd, file="data.txt", n=100)

# clean up
file.remove("data.txt")

Run the code above in your browser using DataLab