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

getWinVal

Retrieve Widget Values for Use in R Code


Description

Get a list of variables defined and set by the GUI widgets. An optional argument scope directs the function to create local or global variables based on the list that is returned.

Usage

getWinVal(v=NULL, scope="", asvector=FALSE, winName="")

Arguments

v

vector of variable names to retrieve from the GUI widgets. If NULL, v retrieves all variables from all GUI widgets.

scope

scope of the retrieval. The default sets no variables in the non-GUI environment; scope="L" creates variables locally in relation to the parent frame that called the function; scope="P" creates variables in the temporary package workspace called .PBSmodEnv; and scope="G" creates global variables (pos=1).

asvector

return a vector instead of a list. WARNING: if a widget variable defines a true vector or matrix, this will not work.

winName

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

Details

TODO: talk about scope=G/P/L and side effects of overwriting existing variables

Value

A list (or vector) with named components, where names and values are defined by GUI widgets.

Author(s)

Alex Couture-Beil, Vancouver Island University, Nanaimo BC

See Also


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.