PTdialog.rpartq {pinktoe}R Documentation

Display a dialog box with text, radiobuttons and submit using Tcl/Tk and return submitted answer

Description

Opens a Tcl/Tk GUI widget with some text, a two-button radio button and decision text and submit/reset buttons. Once submit is pressed the state of the radiobutton is returned.

Usage

PTdialog.rpartq(questiontext, qopts = NULL, qno = NULL, explaintext = NULL)

Arguments

questiontext Character string containing question relating to radiobutton
qopts Character string containing text describing one option of the radiobutton
qno Character string containing text describing the other option of the radiobutton.
explaintext Character string containing (extended) text presented before the radiobutton

Details

A simple Tcl/Tk widget display function that permits some text to be displayed, a question to be displayed and two answers with two sets of text strings containing the answer text.

Value

Returns the qopts or qno string (indicating the answer) if these are not NULL. Otherwise returns "yes" or "no".

Note

Not intended for general user use

Author(s)

Guy P Nason

References

http://www.stats.bris.ac.uk/~magpn/Research/Pinktoe/pinktoe.htm

Examples

    library("tcltk")
## Not run: 
PTdialog.rpartq("Is it possible for a swallow to carry a coconut?", qopts="Yes, certainly", qno="No way", explaintext="A question from Monty Python's Holy Grail")
## End(Not run)

[Package pinktoe version 2.0 Index]