From ihaka at stat.auckland.ac.nz  Wed Oct  1 08:45:41 2003
From: ihaka at stat.auckland.ac.nz (Ross Ihaka)
Date: Tue Sep 30 21:45:14 2003
Subject: [Rd] another dump/source problem?
In-Reply-To: <Pine.LNX.4.44.0309301928430.1170-100000@kleigh.nl>
References: <Pine.LNX.4.44.0309301928430.1170-100000@kleigh.nl>
Message-ID: <3F79DD65.3050502@stat.auckland.ac.nz>

Peter Kleiweg wrote:

> Is this a bug?

Yes.  If you look inside the saved file it contains

	..., call = dist(x = USArrests), ...

When this is reread, an attempt is made to evaluate the call.
Some kind of quoting is needed.

> I do this:
> 
>     library(mva)
>     data(USArrests)
>     d <- dist(USArrests)
>     dump("d", "tst")
>     q()
> 
> I restart R and do this:
> 
>     source("tst")
> 
> And I get:
> 
>     Error in as.matrix(x) : Object "USArrests" not found



-- 
Ross Ihaka                         Email:  ihaka@stat.auckland.ac.nz
Department of Statistics           Phone:  (64-9) 373-7599 x 85054
University of Auckland             Fax:    (64-9) 373-7018
Private Bag 92019, Auckland
New Zealand


[Rd] another dump/source problem?
Ross Ihaka