library(iplots) cat("Select 'Break' from the menu of any plot to return back to R.\n") set.seed(1) dat = data.frame(x = rep(1:4, c(50, 100, 150, 80)), y = sample(rep(1:6, c(150, 50, 30, 70, 10, 70)))) ibar(dat$x) while (!is.null(ievent.wait())) { if (iset.sel.changed()) { s <- iset.selected() if (length(s) > 1) pie(table(dat$y[s])) } }