dsort: Sort data frame

View source: R/dsort.R

dsortR Documentation

Sort data frame

Description

Sort data according to columns in data frame

Usage

dsort(data, x, ..., decreasing = FALSE, return.order = FALSE)

Arguments

data

Data frame

x

variable to order by

...

additional variables to order by

decreasing

sort order (vector of length x)

return.order

return order

Value

data.frame

Examples

data(data="hubble",package="lava")
dsort(hubble, "sigma")
dsort(hubble, hubble$sigma,"v")
dsort(hubble,~sigma+v)
dsort(hubble,~sigma-v)

## with direct asignment
dsort(hubble) <- ~sigma-v

mets documentation built on Jan. 17, 2023, 5:12 p.m.