Learn R Programming

RSurvey (version 0.9.3)

SetSortOrder: GUI: Sort Order

Description

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

Usage

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.

See Also

order

Examples

Run this code
# 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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab