partitionBy: partitionBy

Description Usage Arguments Value Note See Also Examples

Description

Defines the partitioning columns in a WindowSpec.

Usage

1
2
3
4
partitionBy(x, ...)

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

Arguments

x

a WindowSpec.

...

additional column(s) to partition on.

col

a column to partition on (described by the name or Column).

Value

A WindowSpec.

Note

partitionBy(WindowSpec) since 2.0.0

See Also

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

Examples

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

## End(Not run)

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