Skip to content
Prev 207844 / 398503 Next

Using tcltk or other graphical widgets to view zoo time series objects

The playwith package might help, though if I understand the problem
correctly, the help(xyplot.zoo) example is not so relevant. If you
want to switch between many series you could use a spin-button or
somesuch. To execute a function you can create a button.

If you have a hundred-column dataset like
dat <- zoo(matrix(rnorm(100*100),ncol=100), Sys.Date()+1:100)
colnames(dat) <- paste("Series", 1:100)

Then this will give you a spin button to choose the column to plot,
and a button to print out the current series number.

playwith(xyplot(dat[,c(1,i)]),  parameters = list(i = 1:100,
    do_something = function(playState) print(playState$env$i))
)

Note that the playwith package uses RGtk2, and therefore requires the
GTK+ libraries to be installed on your system.
On 28 January 2010 23:16, Gabor Grothendieck <ggrothendieck at gmail.com> wrote:
-- 
Felix Andrews / ???
Postdoctoral Fellow
Integrated Catchment Assessment and Management (iCAM) Centre
Fenner School of Environment and Society [Bldg 48a]
The Australian National University
Canberra ACT 0200 Australia
M: +61 410 400 963
T: + 61 2 6125 4670
E: felix.andrews at anu.edu.au
CRICOS Provider No. 00120C