Chapman and Hall/CRC, 2012. — 479 p. — ISBN: 1439856826, 9781439856826.
Programming Graphical User Interfaces with R introduces each of the major R packages for GUI programming: RGtk2, qtbase, Tcl/Tk, and gWidgets. With examples woven through the text as well as stand-alone demonstrations of simple yet reasonably complete applications, the book features topics especially relevant to statisticians who aim to provide a practical interface to functionality implemented in R. The book offers:
A how-to guide for developing GUIs within R
The fundamentals for users with limited knowledge of programming within R and other languages
GUI design for specific functions or as learning tools
The accompanying package, ProgGUIinR, includes the complete code for all examples as well as functions for browsing the examples from the respective chapters. Accessible to seasoned, novice, and occasional R users, this book shows that for many purposes, adding a graphical interface to one’s work is not terribly sophisticated or time consuming.
The Fundamentals of Graphical User InterfacesA simple GUI in R
GUI design principles
Controls
Containers
The gWidgets PackagegWidgets: Overview
Constructors
Methods
Event handlers
Dialogs
Installation
gWidgets: Container WidgetsTop-level windows
Box containers
Grid layout: the glayout container
Paned containers: the gpanedgroup container
Tabbed notebooks: the gnotebook container
gWidgets: Control WidgetsButtons
Labels
Text-editing controls
Selection controls
Display of tabular data
Display of hierarchical data
Actions, menus, and toolbars
gWidgets: R-specific WidgetsA graphics device
A data frame editor
Workspace browser
Help browser
Command line widget
Simplifying creation of dialogs
The RGtkPackageRGtk2: Overview
Synopsis of the RGtk2R Package!RGtkAPI
Objects and classes
Constructors
Methods
Properties
Events and signals
Enumerated types and flags
The event loop
Importing a GUI from Glade
RGtk2: Windows, Containers, and DialogsTop-level windows
Layout containers
Dialogs
Special-purpose containers
RGtk2: Basic ComponentsButtons
Static text and images
Input controls
Progress reporting
Wizards
Embedding R graphics
Drag-and-drop
RGtk2: Widgets Using Data ModelsDisplaying tabular data
Displaying hierarchical data
Model-based combo boxes
Text-entry widgets with completion
Sharing buffers between text entries
Text views
Text buffers
RGtk2: Application WindowsActions
Menus
Toolbars
Status reporting
Managing a complex user interface
Extending GObject ClassesThe qtbase PackageQt: Overview
The Qt library
An introductory example
Classes and objects
Methods and dispatch
Properties
Signals
Enumerations and flags
Extending Qt classes from R
QWidget basics
Importing a GUI from QtDesigner
Qt: Layout Managers and ContainersLayout basics
Box layouts
Grid layouts
Form layouts
Frames
Separators
Notebooks
Scroll areas
Paned windows
Qt: WidgetsDialogs
Labels
Buttons
Checkboxes
Radio groups
Combo boxes
Sliders and spin boxes
Single-line text
QWebView widget
Embedding R graphics
Drag-and-drop
Qt: Widgets Using Data ModelsDisplaying tabular data
Displaying lists
Model-based combo boxes
Accessing item models
Item selection
Sorting and filtering
Decorating items
Displaying hierarchical data
User editing of data models
Drag-and-drop in item views
Widgets with internal models
Implementing custom models
Implementing custom views
Viewing and editing text documents
Qt: Application WindowsActions
Menu bars
Context menus
Toolbars
Status bars
Dockable widgets
The tcltk PackageTcl/Tk: Overview
A first example
Interacting with Tcl
Constructors
Events and callbacks
Tcl/Tk: Layout and ContainersTop-level windows
Frames
Geometry managers
Other containers
Tcl/Tk: Dialogs and WidgetsDialogs
Selection widgets
Tcl/Tk: Text, Tree, and Canvas WidgetsScroll bars
Multiline text widgets
Menus
Treeview widget
Canvas widget
Concept indexClass and method index