Re: [R] reading short int and float from binary connection

2004-03-18 Thread Jim Lemon
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

[R] reading short int and float from binary connection

2004-03-17 Thread Angel Lopez
Hi, I have a binary file with mixture of short integers (2 bytes) and floats (4 bytes). To get the data into R I use readBin reading each value one at a time (n=1) but it is giving me headaches, two questions: -In the what option is there any difference between integer and int? -To read the

Re: [R] reading short int and float from binary connection

2004-03-17 Thread Uwe Ligges
Angel Lopez wrote: Hi, I have a binary file with mixture of short integers (2 bytes) and floats (4 bytes). To get the data into R I use readBin reading each value one at a time (n=1) but it is giving me headaches, two questions: -In the what option is there any difference between integer and

Re: [R] reading short int and float from binary connection

2004-03-17 Thread Angel Lopez
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