View source: R/safety_checks.R
| read_safe_bin | R Documentation |
Calls readBin and then checks that the
returned vector has the expected length. If the file ends prematurely,
readBin silently returns fewer elements — this wrapper turns that
into an explicit error.
read_safe_bin(con, what, n, size, endian, ...)
con |
a connection object. |
what |
character string or type, passed to |
n |
integer, the number of elements to read. |
size |
integer, the number of bytes per element. |
endian |
character string, |
... |
additional arguments passed to |
the vector of data read from the connection.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.