[R] S <-> R

Rolf Turner rolf at math.unb.ca
Wed Aug 25 20:27:17 CEST 2004


Thanks Tony.  But the Mr. Skrivanek initially said he couldn't get
dput() and dget() to work with ***lists***.  It seems to turn out
that lists, as such, are not the issue.  The problem stems from
having relatively weird components in the lists.

Also, in your example, the issue is not an R <--> S incompatibility
problem.  The example causes an error even if one stays entirely
within Splus (or within R):

===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===
> junk <- list(f=as.name("g"))
> dput(junk,"junk.dat")
> crap <- dget("junk.dat")
Problem in dget("junk.dat"): Object "g" not found 
Use traceback() to see the call stack
===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===

And the same happens in R (except that the error message is phrased
differently:

===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===
Error in structure(list(f = g), .Names = "f") : 
        Object "g" not found
===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===

					cheers,

						Rolf Turner
						rolf at math.unb.ca




More information about the R-help mailing list