Learn R Programming

RPMG (version 2.2-7)

SELOPT: Select Options

Description

Select buttons interactively.

Usage

SELOPT(OPTS, onoff = -1, ncol=5, ocols = "white",
       cex=1, default="opt" )

Value

character list of selected options

Arguments

OPTS

character list of buttons

onoff

which buttons are active, onoff=-1 turns all buttons off, onoff=0 turns all buttons on, any other vector is an index vector to selected options

ncol

number of columns, default = 5

ocols

colors for plotting option boxes

cex

character expansion for text in boxes

default

default vector of options

Author

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

Details

Used in swig. OPtions can be added, subtracted, deleted, or completely filled out based on interactive choice.

See Also

OPTREPLOT, chooser

Examples

Run this code

if (FALSE) {
STDLAB=c("DONE", "QUIT", "zoom.out", "zoom.in", "SELOPT",
"FILT","UNFILT",
 "PSEL", "SGRAM", "WLET", "SPEC", "XTR" )
onoff = rep(0, length(STDLAB))
onoff[1:5] = 1
SELOPT(STDLAB, onoff=onoff)

###   second option for selecting colors
###dev.new(width=12, height=12)

scol = SELOPT(colors(),  onoff=-1, ncol=15, ocols =colors(), cex=.6 )

###  old program
SHOWPAL(scol, NAME=TRUE)

###  show the options chosen from top to bottom
OPTREPLOT(scol,  cols=scol,  scol="green", bcol="blue", slwd=15 )


}

Run the code above in your browser using DataLab