r - Multiple plots with high-level plotting functions, especially plot.rqs() -


i trying plot 2 regression summaries side-by-side 1 centered title. each regression summary generated plot.rqs() , amounts set of 9 plots.

i've tried using par(mfrow=c(1,2)) already, learnt paul murrel's (2006) book, high-level functions plot.rqs() or pairs() save graphics state before drawing , restore graphics state once completed, pre-emptive calls par() or layout() can't me. plot.rqs() doesn't have 'panel' function either.

it seems way achieve result modify plot.rqs() function new function, modified.plot.rqs(), , run

par(mfrow=c(1,2)) modified.plot.rqs(summary(fit1)) modified.plot.rqs(summary(fit2)) par(mfrow=c(1,1)) 

from there might able work out how add overall title image using layout(). know how create modified.plot.rqs() function used in way?

thanks

you can patch function follows: use dput , capture.output retrieve code of function, string; change want (here, replace each occurrence of par function nothing); evaluate result produce new function.

library(quantreg) <- capture.output(dput(plot.summary.rqs)) b <- gsub("^\\s*par\\(", "nop(", a) nop <- function(...) {} my.plot.summary.rqs <- eval(parse(text=b)) 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -