Skip to content

Load Ascii file in R

2 messages · SHEN_MO_JUN@lilly.com, Brian Ripley

#
Hi,

I am using R-1.5.1 on windows 2000.  I encountered  a problem when I tried 
to load a ascii .RData file 
whose first line is "RDA2". The error message is "restore file may be from 
a newer version of R -- no 
data loaded". 

I noticed that the error comes from magic comparison when load file.  The 
magic comparision of  the first 
five characters in the ascii file and the "RDA2\n" is always fail, and 
then comparison of "RD" is successful.
 
How can I solve the issue if I'd not like to recompile the source code? 

Looking forward to hearing from you. Thanks.

Mo Jun Shen
Lilly Systems Biology Pte Ltd
1 Science Park Road #04-01
The Capricorn
Singapore 117528
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/20020813/969df4de/attachment.html
#
How did you get such a file?

My guess is that you transferred the file from some other machine and
mangled the line endings en route.  As the following shows,
it does work, and the file is written with LF and not CRLF line endings.
If I convert that file to CRLF line endings I get the error you report.

The solution seems to be to either convert the file to LF in a good
editor, or to track down where it is getting corrupted.
On Tue, 13 Aug 2002 SHEN_MO_JUN at lilly.com wrote:

            
How did you manage to find out what the binary code was doing without
building a debug version?