[R] problem with loadURL -- claims newer version used

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon May 10 19:20:46 CEST 2004


big5r.txt is delimited by CR not LF, and as R writes it as a binary file, 
that's not the file that got saved.

Same problem with the header on big5r.  

Try some octal dumps and find out which step is changing the file.

BTW, I would use load(url(someURL)) these days.

On Mon, 10 May 2004, William Revelle wrote:

> Dear list,
> 
> I am trying to prepare a handout showing how to use R for factor 
> analysis.  As part of the exercise I want to save a correlation 
> matrix on a tutorial web page.  I can save with no problem (saving 
> locally and then transferring to the web site).  Although I can 
> load() the local file, I am having problems getting loadURL to read 
> the remote file.   I have tried saving it as an ascii file or just 
> using the default format.
> 
> Using R 1.9.0 on a Mac with OS 10.3
> 
> 
> I first saved the file:
> save(big5r,file="big5r.txt",ascii=TRUE)
> and
> save(big5r,file="big5r")
> I can load either version from a local file using load().
> 
> I then have moved these files to a webserver and tried to load them 
> using the loadURL() command.
> 
> Using loadURL() I get the following message
> 
>   >loadURL("http://personality-project.org/r/datasets/big5r") 
> #the default format
> Error: restore file may be from a newer version of R -- no data loaded
> >loadURL("http://personality-project.org/r/datasets/big5r.txt")   #ascii format
> Error: restore file may be from a newer version of R -- no data loaded
> 
> I  can list the second file using a web browser and I can move the 
> first file back to my machine and load it locally.
> My problem seems to be with loadURL.
> 
> Any help would be appreciated.
> 
> Bill
> 
> 
> 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list