[R] creating a jpeg from xyplot with openbugs

Chris chris.barker at barkerstats.com
Thu Nov 5 23:30:51 CET 2015

 I'm using xyplot to plot MCMC results generated via R2openbugs and coda and trying to create jpeg outputs. the jpegs are blank
I can plot the MCMC object with xyplot at the command line
however, when I use a function to send the  plot to a jpeg (or to a bmp, or png or pdf) the file is created and the plot is blank
>>>>>example commands
cond.out10c <- bugs(data.cond, inits, params, model.file,codaPkg=TRUE, n.iter=50000)cond.out.coda10c <- read.bugs(cond.out10c) 
>>>>the following command displays the xyplotxyplot(cond.out.coda10c)
>>>>The following command creates a jpeg inside a function, but the jpeg is blankxysendit <- function(mcmcobj){jpeg(file="C:\\testplot.jpg")xyplot(mcmcobj)dev.off()}xysendit(cond.out.coda10c)

Chris Barker, Ph.D.
Adjunct Associate Professor of Biostatistics - UIC-SPH
415 609 7473 
skype: barkerstats

	[[alternative HTML version deleted]]

More information about the R-help mailing list