Learn R Programming

RSurvey (version 0.7-9)

ManageVariables: Manage Variables

Description

A GUI for managing variables in the data table.

Usage

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

Arguments

cols
list; see Value.
vars
list; see Value.
query
character; see Value.
changelog
data.frame; see Value.
parent
tkwin; the GUI parent window.

Value

  • Returns a 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:
  • namecharacter; variable name.
  • formatcharacter; the conversion specification format (optional).
  • idcharacter; a unique identifier that is created from name.
  • funcharacter; the expression evaluated when computing the variables vector of values.
  • indexinteger; the variables component index number in the data.raw data frame, see ImportData. Only required for variables directly linked to data columns in data.raw.
  • classcharacter; the data class of the vector object.
  • summarylist; a summary of the variables descriptive statistics (see summary).
  • commentscharacter; user comments.
  • The vars object is a list with components:
  • x, y, z, vx, vy, sort.oninteger; 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.
  • querycharacter; if required, variable names are updated.
  • changelogdata.frame; if required, names in 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
data(ex.project)
Data(replace.all = ex.project)
ManageVariables(ex.project$cols, ex.project$vars, ex.project$query,
                ex.project$changelog)

Run the code above in your browser using DataLab