orderBy: Ordering Columns in a WindowSpec

Description Usage Arguments Value Note See Also Examples

Description

Defines the ordering columns in a WindowSpec.

Usage

1
2
3
4
5
6
7
orderBy(x, col, ...)

## S4 method for signature 'WindowSpec,character'
orderBy(x, col, ...)

## S4 method for signature 'WindowSpec,Column'
orderBy(x, col, ...)

Arguments

x

a WindowSpec

col

a character or Column indicating an ordering column

...

additional sorting fields

Value

A WindowSpec.

Note

orderBy(WindowSpec, character) since 2.0.0

orderBy(WindowSpec, Column) since 2.0.0

See Also

See arrange for use in sorting a SparkDataFrame

Other windowspec_method: partitionBy(), rangeBetween(), rowsBetween()

Examples

1
2
3
4
5
## Not run: 
  orderBy(ws, "col1", "col2")
  orderBy(ws, df$col1, df$col2)

## End(Not run)

SparkR documentation built on June 3, 2021, 5:05 p.m.