Dan Kelley
2009-Apr-03 17:53 UTC
[Rd] Error in par(split.screens[[n]]) : parameter "i" in "mfg" is out of range
I'm working on my 'oce' package, trying split.screen() instead of par(mfrow). My code is too long to post, and I hope it's ok that I ask this question without doing so. My code seems to work fine when I source() it, but when I do "R CMD check" on my package, I get the error that I've put as the subject line, when it runs examples. If I comment out the plot() commands from my examples, and build the package, then I can run those examples (with the plot() uncommented) from the commandline, with no problems. And I can run them from the console. I don't actually understand the error, although I can see that it is occurring in a call to screen(). Has anyone else run across this? Is there a trick I should employ, e.g. making my package depend on the graphics package or setting up a virtual device of some type for use in the building process? PS. This is on OS X with the 2.8.1 version of R. -- View this message in context: http://www.nabble.com/Error-in-par%28split.screens--n--%29-%3A-parameter-%22i%22-in-%22mfg%22-is-out-of-range-tp22873439p22873439.html Sent from the R devel mailing list archive at Nabble.com.
Dan Kelley
2009-Apr-03 23:41 UTC
[Rd] Error in par(split.screens[[n]]) : parameter "i" in "mfg" is out of range
As a followup, in case this is of use to others, I got my code working by altering R-2.8.1/src/library/graphics/R/screen.R slightly, removing the sole reference to "mfg", as follows. assign("par.list", c("xlog","ylog", "adj", "bty", "cex", "col", "crt", "err", "font", "lab", "las", "lty", "lwd", "mar", "mex", ##"mfg", "mgp", "pch", "pty", "smo", "srt", "tck", "usr", "xaxp", "xaxs", "xaxt", "xpd", "yaxp", "yaxs", "yaxt", "fig"), envir=.SSenv) -- View this message in context: http://www.nabble.com/Error-in-par%28split.screens--n--%29-%3A-parameter-%22i%22-in-%22mfg%22-is-out-of-range-tp22873439p22878253.html Sent from the R devel mailing list archive at Nabble.com.