setVariableList: setVariableList

Description Usage Arguments Details Value Author(s) Examples

Description

GUI for selecting from available netCDF variables (under development)

Usage

1
setVariableList(fname, VarList = vector(), single = FALSE)

Arguments

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.

Details

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'.

Value

A vector of character names of the selected variables.

Author(s)

William Cooper

Examples

1
## Not run: setVariableList("/scr/raf_data/WINTER/WINTERrf11.nc", c("ATX", "PSXC"))

WilliamCooper/Ranadu documentation built on July 10, 2019, 12:40 a.m.