[R] How to read a binary file bit by bit?
mvalle at cscs.ch
Fri May 29 11:27:14 CEST 2009
In my humble opinion, forget R and use more appropriate tools, like a
very small C program that reads 10 bytes at a time and outputs 8 integers.
Then use R to read the resulting file.
Inigo Pagola Barrio wrote:
> Hello everybody,
> I am trying to a read a binary file with different formats. I use the readBin function so I can read bytes, short and double numbers depending on the bytes per element in the byte stream. But now I need to read bit by bit, and join them in groups of ten because every ten bits will form a number. How can I do this?
> Iñigo Pagola
> Solar Thermal Energy Deparment
> CENTRO NACIONAL DE ENERGÍAS RENOVABLES
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Ing. Mario Valle
Data Analysis and Visualization Group | http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS) | Tel: +41 (91) 610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax: +41 (91) 610.82.82
More information about the R-help