[R] creating a jpeg from xyplot with openbugs
Bert Gunter
bgunter.4567 at gmail.com
Fri Nov 6 01:58:29 CET 2015
Oh, and incidentally, you appear to be mixing base graphics -- the
jpeg() call -- with lattice graphics, xyplot(). See ?trellis.device
for lattice details.
-- Bert
Bert Gunter
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
-- Clifford Stoll
On Thu, Nov 5, 2015 at 2:30 PM, Chris <chris.barker at barkerstats.com> wrote:
> 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]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list