On Wed, 5 May 2004 20:20:51 +0100 (BST), Prof Brian Ripley <[EMAIL PROTECTED]> wrote :
>I don't think it is a bug. Note that dump does not even claim to dump >lists let alone symbols, but ?dump says > > At present the implementation of 'dump' is very incomplete and it > really only works for functions and simple vectors. > >Given that, this is not unexpected. (Looks like more than one person did >not check the help page ....) > >I think save/load is a much safer way to handle saving R objects, and it >does work in PD's example. I'd still call it a bug, since 'dump("x"); source("dumpdata.R")' could change the meaning of x without any warning, and that can't be desirable behaviour. For example, > f<-function (...) + { + return(list(call.list = as.list(match.call()))) + } > x <- f(y=4) > x $call.list $call.list[[1]] f $call.list$y [1] 4 > f <- quote(g) > dump("x") > source("dumpdata.R") > x $call.list $call.list[[1]] g $call.list$y [1] 4 If dump() can't handle certain kinds of objects, then it should signal an error, it shouldn't dump something that can't be sourced properly. Duncan Murdoch ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html