On Wed, Dec 10, 2008 at 4:40 AM, Duncan Murdoch <[EMAIL PROTECTED]>wrote:

> [deletions, including attribution, which I think were Stavros then Luke
> then Peter:]
>>
>> In R, most data types (including numeric vectors) do not have a standard
>>>> external representation which can be read back in without evaluation.
>>>>
>>> ...
> I would have thought the save() format (possibly with ascii=TRUE) was the
> standard external representation.  I believe your examples and 1.0/3 both
> survive save()/load().
>
> Or does "standard external representation" imply that the parser can
> reconstruct the object?


I'm afraid I was thinking so much in the Lisp framework that I didn't really
explain clearly what I had in mind.  I was thinking of something like
s-expressions, where the standard external representation is human-readable
but also unambiguously machine-readable.  In R, regular 'print' is not
machine-readable; dput is both human and machine-readable but not
unambiguously; and save/ascii is unambiguous but not human-readable.


>  If so, there would be other things besides .const that would be needed.
>  In particular, environments and the more exotic types like promises and
> external pointers aren't deparsed in a parsable way.  Environments and
> promises do survive save/load, but I don't think there's any way external
> pointers could.
>

I think it's understood in dynamic languages that some things are transient,
such as open files and the like....

            -s

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to