read_uint8 | R Documentation |
Read integer values into a standard R vector of integers or alternate containers for large types
read_uint8(con, n = 1, endian = NULL)
read_int8(con, n = 1, endian = NULL)
read_int16(con, n = 1, endian = NULL)
read_uint16(con, n = 1, endian = NULL)
read_int32(con, n = 1, endian = NULL)
read_uint32(con, n = 1, endian = NULL, promote = NULL)
read_int64(con, n = 1, endian = NULL, promote = NULL, bounds_check = NULL)
read_uint64(con, n = 1, endian = NULL, promote = NULL, bounds_check = NULL)
con |
Connection object or raw vector. Connection objects can be
created with |
n |
Number of elements to read. Default: 1 |
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 |
promote |
For 'uin32', 'int64' and 'uint64' types, the range of possible
values exceeds R's standard integer type. For these integer types,
values will be promoted to a different container type.
Possible options 'dbl', 'raw', 'hex' and 'bit64'.
Default: NULL indicates that
this 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 |
read_int8()
and read_uint8()
read_int16()
and read_uint16()
read_int32()
and read_uint32()
read_int64()
and read_uint64()
Integer data. Usually in standard R integer vector but depending on
the promote
option may be returned in alternate formats
Other data input functions:
read_f64()
,
read_hex()
,
read_raw()
,
read_str()
,
scan_dbl()
# Raw vector with 16 bytes (128 bits) of dummy data
data <- as.raw(c(1:7, 0, 1:8))
con <- rawConnection(data, 'rb')
read_int64(con, n = 1)
read_uint8(con, n = 4)
close(con)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.