write_elements,BinaryWriter,numeric-method | R Documentation |
Write elements to a BinaryWriter object.
## S4 method for signature 'BinaryWriter,numeric'
write_elements(x, els)
x |
Object of class BinaryWriter |
els |
Numeric vector of elements to write |
Invisibly returns NULL
, called for its side effect of writing elements to the binary writer.
# Create a temporary binary file for writing
tmp <- tempfile()
writer <- BinaryWriter(tmp, byte_offset = 0L,
data_type = "DOUBLE", bytes_per_element = 8L)
# Write some data
write_elements(writer, rnorm(100))
close(writer)
# Clean up
unlink(tmp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.