Is there some sort of 'with.par' function that temporarily changes par
parameters and then re-sets them so that instead of doing things such as
opar - par(mar=c(4.1,4.1,4.1,8),...)
do things
par(opar)
you can do something like
with.par(mar=c(4.1,4.1,4.1,8),...,
do things)
where all but
Jim Ottaway wrote:
Is there some sort of 'with.par' function that temporarily changes par
parameters and then re-sets them so that instead of doing things such as
opar - par(mar=c(4.1,4.1,4.1,8),...)
do things
par(opar)
you can do something like
with.par(mar=c(4.1,4.1,4.1,8),...,
do
Romain Francois romain.franc...@dbmail.com writes:
Jim Ottaway wrote:
Is there some sort of 'with.par' function that temporarily changes par
parameters and then re-sets them so that instead of doing things such as
with is generic, so you could do something like that:
par - function( ... )
Romain Francois romain.franc...@dbmail.com writes:
with is generic, so you could do something like that:
par - function( ... ) structure( graphics::par( ... ), class = par )
with.par - function( data, expr, ... ){
+old.par - data
+expr
+invisible( par( old.par ) )
+ }
with(
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,
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
6 matches
Mail list logo