Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

setWinVal

Update Widget Values


Description

Update a widget with a new value.

Usage

setWinVal(vars, winName)

Arguments

vars

a list or vector with named components.

winName

window from which to select GUI widget values. The default takes the window that has most recently received new user input.

Details

The vars argument expects a list or vector with named elements. Every element name corresponds to the widget name which will be updated with the supplied element value.

The vector, matrix, and data widgets can be updated in several ways. If more than one name is specified for the names argument of these widgets, each element is treated like an entry widget.

If however, a single name describes any of these three widgets, the entire widget can be updated by passing an appropriately sized object.

Alternatively, any element can be updated by appending its index in square brackets to the end of the name. The data widget is indexed differently than the matrix widget by adding "d" after the brackets. This tweak is necessary for the internal coding (bookkeeping) of PBS Modelling. Example: "foo[1,1]d".

Author(s)

Alex Couture-Beil, Vancouver Island University, Nanaimo BC

See Also

Examples

## Not run: 
local(envir=.PBSmodEnv,expr={
  winDesc <- c("vector length=3 name=vec",
    "matrix nrow=2 ncol=2 name=mat", "slideplus name=foo");
  createWin(winDesc, astext=TRUE)
  setWinVal(list(vec=1:3, "mat[1,1]"=123, foo.max=1.5, foo.min=0.25, foo=0.7))
})

## End(Not run)

PBSmodelling

GUI Tools Made Easy: Interact with Models and Explore Data

v2.68.8
GPL (>= 2)
Authors
Jon T. Schnute [aut], Alex Couture-Beil [aut], Rowan Haigh [aut, cre], Nicholas Boers [ctb], Anisa Egeli [ctb], A. R. Kronlund [ctb], Steve Martell [ctb], Norm Olsen [ctb]
Initial release
2019-03-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.