Learn R Programming

readMLData (version 0.9-7)

dsSort: Sort the rows of a data frame.

Description

Sort the rows of a data frame lexicographically. This allows to compare two data sets as sets of cases disregarding their order.

Usage

dsSort(dat)

Arguments

dat
a dataframe.

Value

Data frame, whose rows are reordered by the sorting.

Details

The function calls order() with the columns of dat as the sorting criteria.

See Also

readMLData.

Examples

Run this code
  pathData <- getPath("exampleData")
  pathDescription <- getPath("exampleDescription")
  dsList <- prepareDSList(pathData, pathDescription)
  dat <- dsRead(dsList, "glass")
  sorted <- dsSort(dat)

Run the code above in your browser using DataLab