Sorry I can't provide reproducible code because it involves
data files. I saw no warning messages.

I'm using Mac 10.3, but the R is compiled by myself from
command line. I'm reading in data from a XDR formatted file.
The first 4 bytes is a 'long' integer, the remainder is double. 

--- problem with 'integer' and 'int' ---

I can read in the doubles with

readBin(fid, 'double', n, 4, endian = 'swap')

n >= 1. No problem. However,

readBin(fid, 'integer', 1, 4, endian = 'swap')
readBin(fid, 'int', 1, 4, endian = 'swap')

return
""

I think even if the type is wrong, the result shouldn't be an
empty string.


---- problem with 'seek' ---

I have addresses a1, a2, a3, ...
When I do

seek(fid, a1)
...
seek(fid, a2)
...
seek(fid, a3)
...

The results are correct. But they're not if I do

seek(fid, a1)
...
seek(fid, a2 - a1, origin = 'current')
...
seek(fid, a3 - a2, origin = 'current')
...

______________________________________________
R-help@stat.math.ethz.ch 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.

Reply via email to