Skip to contents

Serialises 64-bit integer ids to a raw byte vector, little-endian by default (as flywire servers expect).

Usage

rids2raw(ids, endian = "little", ...)

Arguments

ids

R ids in any form coercible to bit64::integer64.

endian

Byte order, "little" (the default), "big", or NULL to use the current platform's.

...

Additional arguments passed to writeBin().

Value

A raw vector of 8 * length(ids) bytes.

Examples

rids2raw(c("123", "456"))
#>  [1] 7b 00 00 00 00 00 00 00 c8 01 00 00 00 00 00 00