Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dsort

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

Analysis of Multivariate Event Times

v1.2.8.1
GPL (>= 2)
Authors
Klaus K. Holst [aut, cre], Thomas Scheike [aut]
Initial release
2020-09-25

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.