Learn R Programming

Rquake (version 2.5-1)

Pick3: PICK Buttons for swig

Description

Picking functions for swig

Usage

Pick3(nh, g)

Value

The return value depends on the nature of the function as it is returned to the main code swig. Choices for returning to swig are: break, replot, revert, replace, donothing, exit.

Arguments

nh

waveform list for RSEIS

g

plotting parameter list for interactive program

Author

Jonathan M. Lees<jonathan.lees@unc.edu>

Details

Buttons can be defined on the fly.

Pick3

Multiple picks on a panel

See Also

swig, PickWin

Examples

Run this code

if(interactive()){ 
######  interactive addition of button in swig
library(RSEIS)
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, package='RSEIS')
JJ = RSEIS::swig(GH, sel=1:10, STDLAB=STDLAB)

}


Run the code above in your browser using DataLab