setVariableList | R Documentation |
GUI for selecting from available netCDF variables (under development)
setVariableList(fname, VarList = vector(), single = FALSE)
fname |
The name of a netCDF file containing variables. |
VarList |
A vector of character names to be selected before user interaction. This might be the result of a call to Ranadu::standardVariables(), for example. |
single |
A logical flag indicating if only one selection should be returned and the function should return immediately after the first selection is made. |
A display of buttons for all the available variables in a netCDF file is generated, with variables already in 'VarList' highlighted. Clicking on buttons highlights them also, and when the File->Set Selections menu item is selected the highlighted list is written to 'VarList'. This routine does some dangerous things with scope to make the tcltk structure work, including assuming that 'VarList' exists in the global environment and, at the end, writing to that variable list. It will over-write an existing 'VarList'.
A vector of character names of the selected variables.
William Cooper
## Not run: setVariableList("/scr/raf_data/WINTER/WINTERrf11.nc", c("ATX", "PSXC"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.