write_uint8 | R Documentation |
Convert values to the given type and write to a connection
write_uint8(con, x, endian = NULL, bounds_check = NULL, na_check = NULL)
write_int8(con, x, endian = NULL, bounds_check = NULL, na_check = NULL)
write_uint16(con, x, endian = NULL, bounds_check = NULL, na_check = NULL)
write_int16(con, x, endian = NULL, bounds_check = NULL, na_check = NULL)
write_uint32(con, x, endian = NULL, bounds_check = NULL, na_check = NULL)
write_int32(con, x, endian = NULL, bounds_check = NULL, na_check = NULL)
write_uint64(con, x, endian = NULL, bounds_check = NULL, na_check = NULL)
write_int64(con, x, endian = NULL, bounds_check = NULL, na_check = NULL)
con |
Connection object or raw vector. When con is a raw vector, new
data will be appended to the vector and returned.
Connection objects can be
created with |
x |
vector to write |
endian |
Ordering of bytes within the file when reading multi-byte values.
Possible values: 'big' or 'little'.
Default: NULL indicates that
endian option should be retrieved from the connection object if possible
(where the user has used |
bounds_check |
Check values lie within bounds of the given type.
Default: NULL indicates that
this option should be retrieved from the connection object if possible
(where the user has used |
na_check |
Check for NAs in the data to be written.
Default: NULL indicates that
this option should be retrieved from the connection object if possible
(where the user has used |
If con
is a connection then this connection is returned invisibly.
If con
is a raw vector then new data is appended to this vector
Other data output functions:
fprintf()
,
write_f64()
,
write_hex()
,
write_raw()
,
write_utf8()
con <- file(tempfile(), "wb")
write_uint8(con, 1:4)
close(con)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.