createVector {PBSmodelling} | R Documentation |
Create a basic window containing a vector and a submit button. This provides a quick way to create a window without the need for a window description file.
createVector(vec, vectorLabels=NULL, func="", windowname="vectorwindow")
vec |
a vector of strings representing widget variables.
The values in vec become the default values for the widget.
If vec is named, the names are used as the variable names. |
vectorLabels |
an optional vector of strings to use as labels above each widget. |
func |
string name of function to call when new data are entered in widget boxes or when "GO" is pressed. |
windowname |
unique window name, required if multiple vector windows are created. |
Alex Couture-Beil, Malaspina University-College, Nanaimo BC
## Not run: #user defined function which is called on new data drawLiss <- function() { getWinVal(scope="L"); tt <- 2*pi*(0:k)/k; x <- sin(2*pi*m*tt); y <- sin(2*pi*(n*tt+phi)); plot(x,y,type="p"); invisible(NULL); }; #create the vector window createVector(c(m=2, n=3, phi=0, k=1000), vectorLabels=c("x cycles","y cycles", "y phase", "points"), func="drawLiss"); ## End(Not run)