Learn R Programming

RSurvey (version 0.9.3)

ManageVariables: GUI: Variable Manager

Description

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

Usage

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

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.

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.

Examples

Run this code
# NOT RUN {
  Data(replace.all = obj)
  ManageVariables(obj$cols, obj$vars, obj$query, obj$changelog)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab