[Rd] Documentation error for data.restore() in package "foreign" (was Re: [R] Import problem with S-Plus 7.0 dataset)
tplate at acm.org
Tue Nov 21 20:44:30 CET 2006
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
> 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
R version 2.4.0 (2006-10-03)
attached base packages:
 "methods" "stats" "graphics" "grDevices" "utils" "datasets"
other attached packages:
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
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
>> It looks like this may need correction (when I try this function out, it
>> returns the file name, not the object restored from the file.)
> Rather, it returns the object names, as documented at that URL and in S.
>> I tried this in R 2.4.0:
>> > sessionInfo()
>> R version 2.4.0 (2006-10-03)
>> LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
>> States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
>> attached base packages:
>>  "methods" "stats" "graphics" "grDevices" "utils"
>>  "base"
>> other attached packages:
>> foreign ncdf
>> "0.8-17" "1.6"
>> -- Tony Plate
>> (redirected from an old thread on R-help -- I was waiting until I had R
>> 2.4.0 installed so that I could verify that this was still a problem.
>> Apologies if it has been fixed since then)
>> Richard M. Heiberger wrote:
>>> It looks like it works. The result you printed is
>>> the name of the file that data.store read. The name of the
>>> variable is the same as the name you called it in S-Plus.
>>> and you should see your data.frame.
>>> R-help at stat.math.ethz.ch mailing list
>>> PLEASE do read the posting guide
>>> and provide commented, minimal, self-contained, reproducible code.
>> R-devel at r-project.org mailing list
More information about the R-devel