window.orderBy {SparkR}R Documentation

window.orderBy

Description

Creates a WindowSpec with the ordering defined.

Usage

window.orderBy(col, ...)

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

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

Examples

## Not run: 
  ws <- window.orderBy("key1", "key2")
  df1 <- select(df, over(lead("value", 1), ws))

  ws <- window.orderBy(df$key1, df$key2)
  df1 <- select(df, over(lead("value", 1), ws))

## End(Not run)

[Package SparkR version 2.0.0 Index]