[R] read binary file seek()

jim holtman jholtman at gmail.com
Mon Jul 27 14:04:12 CEST 2009


readBin reads in bytes.  If you want to read starting at a variable
'bit' location, then you will have to write a function that will read
in the bytes and then shift the data the corresponding number of bits.
 Exactly what are you reading in and what processing do you want to do
on it.

On Mon, Jul 27, 2009 at 7:34 AM, Andreas Posch<andreas.posch at tugraz.at> wrote:
> I want to read in a binary file using the readBin() function. In order to
> skip uninformative parts of the file I use the seek() function, I need to
> specify the number of bits to skip rather than the number of bytes to skip.
>
>
>
> E.g. seek(to.read,origin="current",blockSize)
>
> with blockSize giving the number of bits
>
>
>
> Does anybody know if this works? Any help would be highly appreciated. Best,
> A.
>
>
>
>
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?




More information about the R-help mailing list