Rui Barradas wrote > > Hello, > > From the help page for readBin: > > "readBin and writeBin read and write C-style zero-terminated character > strings." > > > Your description of the string doesn't match this one. To read any sort > of character strings, use readChar. > > readChar(to.read, nchars = 4, useBytes = TRUE) > > Many times, when I have problems with readBin, this works. > > Hope this helps, > > Rui Barradas
Ok, that one worked, thanks alot. I would not have understood that "C-style zero-terminated character strings" is something different. I guess I will crash into more problems like this, as I am new to working with binary files. -- View this message in context: http://r.789695.n4.nabble.com/Reading-binary-files-tp4633078p4633106.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@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.