[R] read binary file seek()

2009-07-27 Thread Andreas Posch
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

Re: [R] read binary file seek()

2009-07-27 Thread jim holtman
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,