[Rd] dput(as.list(function...)...) bug
Stavros Macrakis
macrakis at alum.mit.edu
Tue Mar 24 15:02:17 CET 2009
Peter, Duncan,
I understand that the missing value indicator is special and will not
behave like an ordinary value in evaluation. I was only discussing its
handling in the text representation functions dput and dump.
Duncan,
You are absolutely right that "list(x=)" is parseable (though not
evaluable). My mistake.
However, the point stands that dput/dget do not successfully recreate
the object, and do not give an error as promised in the documentation.
I said: "dput does not give a warning as specified" and you quoted
?.deparseOpts:
Some exotic objects such as environments, external pointers, etc.
can not [sic] be
deparsed properly. This option causes a warning to be issued if
any of those
may give problems....
You apparently read this to mean that only environments and external
pointers are "exotic objects":
That's not what "warnIncomplete" is documented to do.... As far
as I can see, none
of those conditions apply here: ff is not one of those exotic
objects or a very long
string....
However, they are listed as examples ("such as"); and there is an
"etc." indicating that there are other, unnamed, exotic objects (and
the missing value indicator seems pretty exotic to me...). What's
more, the sentence explicitly says that the warning is issued "if
*any* of those may give problems" (not "some"); the definition is not
in terms of a list of "exotic objects", but in terms of the behavior
of "giving problems".
That is the plain English sense of the passage, and also the
substantively reasonable one.
-s
More information about the R-devel
mailing list