if(interactive()){
MYFUNC<-function(nh, g)
{
print("pressed MYFUNC")
d <- data.frame(list(stations=nh$STNS, components=nh$COMPS))
print(d)
g$action <- "replot"
invisible(list(global.vars=g))
}
STDLAB <- c("DONE", "QUIT", "SELBUT" , "MYFUNC" )
data(GH)
JJ <- swig(GH, sel=1:10, STDLAB=STDLAB)
}
Run the code above in your browser using DataLab