| createWin {PBSmodelling} | R Documentation |
Create a GUI window with widgets using instructions from a Window Description (markup) File.
createWin(fname, astext=FALSE)
fname |
name of window description file
or list returned from parseWinFile. |
astext |
logical: if TRUE, interpret fname
as a vector of strings with each element representing a line
in a window description file. |
Generally, the markup file contains a single widget per line. However, widgets can span multiple lines by including a backslash ('\') character at the end of a line, prompting the suppression of the newline character.
For more details on widget types and markup file, see “PBSModelling-UG.pdf”
in the R directory
.../library/PBSmodelling/doc.
It is possible to use a Window Description List produced by
compileDescription rather than a file name for fname.
Another alternative is to pass a vector of characters to fname and set
astext=T. This vector represents the file contents where each element
is equivalent to a new line in the window description file.
Microsoft Windows users may experience difficulties switching focus between the R console and GUI windows. The latter frequently disappear from the screen and need to be reselected (either clicking on the task bar or pressing <Alt><Tab>. This issue can be resolved by switching from MDI to SDI mode. From the R console menu bar, select <Edit> and <GUI preferences>, then change the value of “single or multiple windows” to SDI.
parseWinFile, getWinVal, setWinVal
closeWin, compileDescription, createVector
initHistory for an example of using astext=TRUE
## Not run:
# See file .../library/PBSmodelling/testWidgets/LissWin.txt
# Calculate and draw the Lissajous figure
drawLiss <- function() {
getWinVal(scope="L"); ti=2*pi*(0:k)/k;
x=sin(2*pi*m*ti); y=sin(2*pi*(n*ti+phi));
plot(x,y,type=ptype); invisible(NULL); };
createWin(system.file("testWidgets/LissWin.txt",package="PBSmodelling"));
## End(Not run)