>>>>> Gabor Grothendieck <ggrothendi...@gmail.com> writes:
> Here is a minor variation: > par <- function( ... ) structure( graphics::par( ... ), class = "par" ) > with.par <- function( data, expr, ... ) { > on.exit(par(old.par, no.readonly = TRUE)) > old.par <- data > invisible(expr) > } > which returns expr invisibly so that this works: > bp <- with(par(mar = c(4, 1, 1, 1)), boxplot(1:10)) Thank you very much, that looks like a better way of cleaning up with an error too than my attempt. Yours sincerely, -- Jim Ottaway ______________________________________________ R-help@r-project.org mailing list 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.