Rev 6304 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{on.exit}\title{Function Exit Code}\usage{on.exit(expr,add=FALSE)}\alias{on.exit}\arguments{\item{expr}{an expression to be executed.}\item{add}{if TRUE, add \code{expr} to be executed after any previouslyset expressions.}}\description{\code{on.exit} records the expression given asits argument as needing to be executed whenthen current function exits (either naturally or as theresult of an error).This is useful for resetting graphical parameters orperforming other cleanup actions.}\examples{opar <- par(mai=c(1,1,1,1))on.exit(par(opar))\testonly{par(opar)}}\keyword{programming}