View source: R/SeaSondeRCSSW.R
seasonder_CSSW_read_asign | R Documentation |
This function reads a raw binary stream from a provided connection, expecting a specific format
that contains the sign bits for self spectra values. The data is divided into 3 groups corresponding
to: cs1a
, cs2a
, and cs3a
.
seasonder_CSSW_read_asign(connection, key)
connection |
A binary connection to read raw bytes from. |
key |
A list containing:
|
The function performs the following steps:
Reads key$size
bytes from the specified connection.
Verifies that the number of bytes read matches the expected size.
Checks that the total number of bytes is divisible by 3, allowing equal distribution among the groups.
Splits the raw byte vector into 3 groups based on the calculated number of bytes per group.
Converts each byte into its 8-bit binary representation (using rawToBits
) and flattens the results for each group.
A named list of 3 vectors, each containing bits as integers (0 or 1) for self spectra sign data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.