Package: ctypesio 0.1.1.9001

ctypesio: Read and Write Standard 'C' Types from Files, Connections and Raw Vectors

Interacting with binary files can be difficult because R's types are a subset of what is generally supported by 'C'. This package provides a suite of functions for reading and writing binary data (with files, connections, and raw vectors) using 'C' type descriptions. These functions convert data between 'C' types and R types while checking for values outside the type limits, 'NA' values, etc.

Authors:Mike Cheng [aut, cre, cph], Anne Fu [ctb]

ctypesio_0.1.1.9001.tar.gz
ctypesio_0.1.1.9001.zip(r-4.5)ctypesio_0.1.1.9001.zip(r-4.4)ctypesio_0.1.1.9001.zip(r-4.3)
ctypesio_0.1.1.9001.tgz(r-4.4-x86_64)ctypesio_0.1.1.9001.tgz(r-4.4-arm64)ctypesio_0.1.1.9001.tgz(r-4.3-x86_64)ctypesio_0.1.1.9001.tgz(r-4.3-arm64)
ctypesio_0.1.1.9001.tar.gz(r-4.5-noble)ctypesio_0.1.1.9001.tar.gz(r-4.4-noble)
ctypesio_0.1.1.9001.tgz(r-4.4-emscripten)ctypesio_0.1.1.9001.tgz(r-4.3-emscripten)
ctypesio.pdf |ctypesio.html
ctypesio/json (API)
NEWS

# Install 'ctypesio' in R:
install.packages('ctypesio', repos = c('https://coolbutuseless.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/coolbutuseless/ctypesio/issues

On CRAN:

5.65 score 3 stars 1 packages 6 scripts 225 downloads 52 exports 0 dependencies

Last updated 6 days agofrom:37e8a9f969. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 13 2024
R-4.5-win-x86_64OKNov 13 2024
R-4.5-linux-x86_64OKNov 13 2024
R-4.4-win-x86_64OKNov 13 2024
R-4.4-mac-x86_64OKNov 13 2024
R-4.4-mac-aarch64OKNov 13 2024
R-4.3-win-x86_64OKNov 13 2024
R-4.3-mac-x86_64OKNov 13 2024
R-4.3-mac-aarch64OKNov 13 2024

Exports:aperm_array_to_vectoraperm_vector_to_arrayflip_endianfprintffprintf_rawread_bfloatread_dblread_f16read_f32read_f64read_floatread_halfread_hexread_int16read_int32read_int64read_int8read_rawread_strread_str_rawread_uint16read_uint32read_uint64read_uint8read_utf8read_utf8_rawscan_dblscan_intscan_strset_bounds_checkset_endianset_eof_checkset_integer_promotionset_na_checkwrite_dblwrite_f16write_f32write_f64write_halfwrite_hexwrite_int16write_int32write_int64write_int8write_rawwrite_singlewrite_uint16write_uint32write_uint64write_uint8write_utf8write_utf8_raw

Dependencies:

Handcrafting a WAV file

Rendered fromwave-format.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2024-10-06
Started: 2024-10-06

Parsing JPEG Markers

Rendered fromparse-jpeg.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2024-10-05
Started: 2024-10-05

Readme and manuals

Help Manual

Help pageTopics
Permute an R array to a linear vector of dataaperm_array_to_vector
Permute a linear vector of data into an R arrayaperm_vector_to_array
Flip the endianness of elements in a vectorflip_endian
Print formatted strings to a connectionfprintf fprintf_raw
Read floating point values from a connectionread_bfloat read_dbl read_f16 read_f32 read_f64 read_float read_half
Read bytes as hexadecimal stringsread_hex
Read raw bytesread_raw
Read a character string from a connectionread_str read_str_raw read_utf8 read_utf8_raw
Read integer data from a connectionread_int16 read_int32 read_int64 read_int8 read_uint16 read_uint32 read_uint64 read_uint8
Read values encoded as characters stringsscan_dbl scan_int scan_str
For this connection, set the response when values do not fit into given type before writing.set_bounds_check
Tag a connection with the preferred endiannessset_endian
Set EOF (End-of-file) handling for this connectionset_eof_check
Tag a connection with the preferred integer promotion method for types larger that R's integer type i.e. uint32, uint64, int64set_integer_promotion
Check for NAs in values before writingset_na_check
Convert values to the given type and write to a connectionwrite_dbl write_f16 write_f32 write_f64 write_half write_single
Write hexadecimal string as raw byteswrite_hex
Write raw byteswrite_raw
Convert values to the given type and write to a connectionwrite_int16 write_int32 write_int64 write_int8 write_uint16 write_uint32 write_uint64 write_uint8
Write UTF8 stringwrite_utf8 write_utf8_raw