Comparing serialized language objects
"Tim Taylor" <[email protected]>
| Newsgroups | gmane.comp.lang.r.general |
|---|---|
| Message-ID | <[email protected]> |
Is there a correct way to compare language objects that may have been serialized?
If I run the following in an interactive, but 'vanilla' R, session:
x <- quote(\(){})
y <- serialize(x, NULL)
z <- unserialize(y)
identical(x, z)
Then the resulting answer is FALSE. But I get TRUE if run as
$ R --vanilla -s -e "x <- quote(\(){})
y <- serialize(x, NULL)
z <- unserialize(y)
identical(x, z)"
[1] TRUE
Is this where I need to start thinking about the refhook argument?
Any help appreciated.
Tim