windowOrderBy {SparkR}R Documentation

windowOrderBy

Description

Creates a WindowSpec with the ordering defined.

Usage

windowOrderBy(col, ...)

## S4 method for signature 'character'
windowOrderBy(col, ...)

## S4 method for signature 'Column'
windowOrderBy(col, ...)

Arguments

col

A column name or Column by which rows are ordered within windows.

...

Optional column names or Columns in addition to col, by which rows are ordered within windows.

Note

windowOrderBy(character) since 2.0.0

windowOrderBy(Column) since 2.0.0

Examples

## Not run: 
##D   ws <- windowOrderBy("key1", "key2")
##D   df1 <- select(df, over(lead("value", 1), ws))
##D 
##D   ws <- windowOrderBy(df$key1, df$key2)
##D   df1 <- select(df, over(lead("value", 1), ws))
## End(Not run)

[Package SparkR version 2.2.0 Index]