SetSortOrder: GUI: Sort Order

Description Usage Arguments Value Author(s) See Also Examples

Description

A graphical user interface (GUI) for specifying the variable used to sort the data set.

Usage

1
SetSortOrder(col.ids, sort.on = NULL, parent = NULL)

Arguments

col.ids

character. Vector of variable names

sort.on

integer. Index for the variable used to sort the data set.

parent

tkwin. GUI parent window

Value

Returns an object of integer class that specifies the index of the variable used to sort the data set. Attributes for this object include: decreasing, a logical value indicating if the sort order is increasing or decreasing; and na.last, a logical value for controlling the treatment of NAs during sorting. If true, missing values in the data are put last; otherwise, they are put first; if NA, they are removed.

Author(s)

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

See Also

order

Examples

1
2
3
4
5
6
7
8
## Not run: 
  col.ids <- c("Variable1", "Variable2", "Variable3")
  sort.on <- 2
  attr(sort.on, "decreasing") <- TRUE
  attr(sort.on, "na.last") <- FALSE
  SetSortOrder(col.ids, sort.on)

## End(Not run)

RSurvey documentation built on May 2, 2019, 3:28 p.m.