Hi Chris (sorry, me again!)
I'm trying to automatically save sixway plots from multiple R2MLwiN models - I'm running lots of models at once so don't want to do it by hand. When I try to use the sixway command, the plot seems to close down automatically after ~5 seconds, and won't let me save it. Any idea how one might do that? So far my colleague (and R guru!) has tried setting a device (such as png()), but this is ignored. He thinks there's a hard-coded clear device (dev.off() or dev.new()) in the sixway() function.
Thanks,
Andy
saving sixway plots from R2MLwiN
-
- Posts: 1384
- Joined: Mon Oct 19, 2009 10:34 am
Re: saving sixway plots from R2MLwiN
Hi Andy,
The following works for me:
The following works for me:
Code: Select all
mypng <- function(filename="test.png", ...) {png(filename, ...) } # Replace test.png with a file name of your choice
options(device="mypng")
sixway(mymodel1@chains[, "RP2_var_Intercept", drop = FALSE], "sigma2u0") # Replace with sixway call corresponding to you model
dev.off()