windowPartitionBy: windowPartitionBy

Description Usage Arguments Note Examples

Description

Creates a WindowSpec with the partitioning defined.

Usage

1
2
3
4
5
## S4 method for signature 'character'
windowPartitionBy(col, ...)

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

Arguments

col

A column name or Column by which rows are partitioned to windows.

...

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

Note

windowPartitionBy(character) since 2.0.0

windowPartitionBy(Column) since 2.0.0

Examples

1
2
3
4
5
6
7
8
## Not run: 
  ws <- orderBy(windowPartitionBy("key1", "key2"), "key3")
  df1 <- select(df, over(lead("value", 1), ws))

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

## End(Not run)

danzafar/tidyspark documentation built on Sept. 30, 2020, 12:19 p.m.