ManageVariables: GUI: Variable Manager

Description Usage Arguments Details Value Author(s) Examples

View source: R/ManageVariables.R

Description

A graphical user interface (GUI) for managing variables in the data table.

Usage

1
ManageVariables(cols, vars, query, changelog, parent = NULL)

Arguments

cols

list. See ‘Value’ section

vars

list. See ‘Value’ section

query

character. See ‘Value’ section

changelog

data.frame. See ‘Value’ section

parent

tkwin. GUI parent window

Details

This GUI lets you: (1) specify the names and format of variables; (2) add new variables based on user defined functions, see EditFunction; (3) display data in a spreadsheet, see EditData; and (4) remove and (or) reorder variables in the data table.

Value

Returns an object of class list with components cols and vars. The cols object is a list whose length is equal to the current number of data variables. Each component in cols is linked to a specific variable, and contains the following components:

name

variable name

format

conversion specification format (optional)

id

unique identifier that is created from name.

fun

expression evaluated when computing the variables vector of values.

index

variable's component index number in the data.raw data table, see ImportText. Only required for variables directly linked to data columns in data.raw.

class

data class of the vector object.

summary

summary of the variable's descriptive statistics (see summary).

comments

user comments

The vars object is a list with components:

x, y, z, sort.on

the index number of the corresponding state variable in cols. These indexes are updated to reflect the removal and (or) reordering of variables in cols.

query

if required, variable names are updated.

changelog

if required, names in the variable component are updated.

Author(s)

J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center

Examples

1
2
3
4
5
## Not run: 
  Data(replace.all = obj)
  ManageVariables(obj$cols, obj$vars, obj$query, obj$changelog)

## End(Not run)

jfisher-usgs/RSurvey documentation built on July 3, 2020, 4:20 p.m.