[R] dump not evaluating promises?

D Sonderegger derek.sonderegger at gmail.com
Thu Apr 29 18:45:49 CEST 2010


I'm using the dump command to pass data to WinBUGS/OpenBUGS/JAGS and have run
into a problem.

Here is some R-code:
foo <- array(1:6, dim=c(2,3))
dump('foo', file='dumpdata.R')
dump('foo', file='dumpdata.R', append=TRUE, evaluate=TRUE)
foo2 <- array(c(2,3,5,7,9,7,5,3), dim=c(2,4))
dump('foo2', file='dumpdata.R', append=TRUE)

And here is the file dumpdata.R:
foo <-
structure(1:6, .Dim = 2:3)
foo <-
structure(1:6, .Dim = 2:3)
foo2 <-
structure(c(2, 3, 5, 7, 9, 7, 5, 3), .Dim = c(2L, 4L))


Looking at the help page, the second dump of foo should look like the dump
of foo2 because the evaluate=TRUE flag tells it to evaluate the promises. 
Unfortunately dump's control parameter didn't offer any solution, either. 
Am I missing anything?  

P.S. I've tried this on versions 2.11 and 2.9 and the results are the same.

-- 
View this message in context: http://r.789695.n4.nabble.com/dump-not-evaluating-promises-tp2075859p2075859.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list