Last data update: 2014.03.03

R: Sort data
arrangeR Documentation

Sort data

Description

Sorts data frame using the columns specified

Usage

arrange(.self, ...)

arrange_(.self, ..., .dots)

Arguments

.self

Data frame

...

Additional parameters

.dots

Workaround for non-standard evaluation

Details

This function takes a parallel data frame and sorts it by the first column specified. If there are any ties then it sorts by the second, and so on. Use desc(x) to specify that x should be sorted in descending order (see desc).

Value

Data frame

See Also

Other row manipulations: distinct, filter, group_by, slice

Examples


dat <- Multiplyr (x=1:100, G=rep(1:4, each=25))
dat %>% arrange (x)
dat %>% arrange (G, x)
dat %>% shutdown()

Results