Skip to content
Prev 22967 / 63421 Next

Documentation error for data.restore() in package "foreign" (was Re: [R] Import problem with S-Plus 7.0 dataset)

Prof Brian Ripley wrote:
> On Tue, 21 Nov 2006, Tony Plate wrote:
>
 >> BTW, the help file for data.restore says:
 >
 >
 > Not in the SVN version at
 >
 > https://svn.r-project.org/R-packages/trunk/foreign/man/read.S.Rd
 >
 > BTW, there is no such function as 'data.store' (sic).
 >
 >
 >> Value: an R version of the S3 object.

Thanks for the fast response.  Indeed, the help file at that address now 
says that data.restore() returns "a character vector containing the 
names of the objects which have been created".

However, the behavior in the my version of R 2.4.0 is that the function 
returns the file name.

 > data.restore("data.dump", verbose=T)
   x list 2
     a integer 5
     b character 3
[1] "data.dump"
 >

 > sessionInfo()
R version 2.4.0 (2006-10-03)
i386-pc-mingw32

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United 
States.1252;LC_MONETARY=English_United 
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
[1] "methods"   "stats"     "graphics"  "grDevices" "utils"     "datasets"
[7] "base"

other attached packages:
  foreign
"0.8-17"
 >

Where should I find the new code that returns a character vector of the 
names of the restored objects?  I've looked in the following places:

* My version of R 2.4.0
* https://svn.r-project.org/R-packages/trunk/foreign/man/read.S.Rd
* ftp://ftp.stat.math.ethz.ch/Software/R/R-devel_2006-11-20.tar.gz

and the code in all those places returns the filename.

Is there somewhere else I should be looking, or is the documentation 
still not aligned with the actual behavior?

-- Tony Plate