rp.grid | R Documentation |
A subsidiary grid is defined at a specified location within an rpanel.
rp.grid(panel, name=paste("grid", .nc(), sep=""), pos=NULL, background=NULL, parentname=deparse(substitute(panel)), ...)
panel |
the panel to which the grid should be attached. |
name |
a string defining the name of the grid. For use with |
pos |
See the help information on "grid" mode in |
background |
a character variable defining a background colour. (This is not the same as colours in R, but simple colours are available.) |
parentname |
this specifies the widget inside which the grid should appear. |
... |
... |
The role of this function is to specify a subsidiary grid at a particular row and column position of the parent grid. Nesting of grids within grids is permitted. See the help information on "grid" mode in rp.pos
for a description of the settings of the pos
argument.
The former argument parent
has been discontinued in version 1.1, while the argument bg
has been renamed background
for consistency with the other functions.
rpanel: Simple interactive controls for R functions using the tcltk package. Journal of Statistical Software, 17, issue 9.
## Not run: panel <- rp.control() rp.grid(panel, pos=list(row=0, column=0, sticky="news"), background="red", name="g0") rp.grid(panel, pos=list(row=1, column=1, sticky="news", width=100, height=100), background="navy", name="g1") rp.grid(panel, pos=list(row=2, column=2, sticky="news", width=150, height=200), background="green", name="g2") rp.button(panel, function(panel) { panel }, "press A", pos=list(row=1, column=1, sticky=""), parentname="g1") rp.button(panel, function(panel) { panel }, "press B", pos=list(row=2, column=2, sticky="news"), parentname="g1") rp.button(panel, function(panel) { panel }, "press C", pos=list("left",width=50, height=150), parentname="g2") rp.grid(panel, pos=list(row=0, column=0, sticky="", width=10, height=10), background="yellow", parentname="g0") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.