Angel Lopez wrote:
> Thanks for the advise.
> I think I've found the solution, the problem was that the file had been
> written from a C program using a structure containing floats and int, if
> I rewrite the C code not using a structure but independent floats and
> ints the data then is read smoothly into R. I still can't figure out why
> a structure is different or how should I have read it into R but it is
> probably more a C than an R question .
> 
You're probably right there. A C structure may be silently aligned by the 
compiler so that value fields are not contiguous in memory. A binary write of 
such a structure cannot be assumed to have bytes in the same order described 
in the structure definition.

Jim

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to