Skip to content
Prev 301935 / 398506 Next

Zoo panel function

On Wed, Aug 1, 2012 at 12:40 AM, Gene Leynes <gleynes at gmail.com> wrote:
As documented in ?plot.zoo the ... argument consists of graphical
parameters so its not just passed to the panel function -- you can
expect warnings if, as here, the parameters are not graphical (as they
are passed to other functions and not just the panel function).

What you can do is to create a panel constructor that uses lexical
scoping to encapsulate the additional parameters:

make.mypanel <- function(v) function(...) mypanel(..., v)
plot(zobj, panel = make.mypanel(v=0) )

Here make.mypanel constructs a mypanel function with the v argument
filled in so you don't have to separately pass it via ... .