# S4 class that represents a WindowSpec

WindowSpec can be created by using windowPartitionBy() or
windowOrderBy()

## Arguments

  - sws:
    
    A Java object reference to the backing Scala WindowSpec

## Note

WindowSpec since 2.0.0

## See also

[windowPartitionBy](https://spark.apache.org/docs/3.5.8/api/R/reference/windowPartitionBy.md),
[windowOrderBy](https://spark.apache.org/docs/3.5.8/api/R/reference/windowOrderBy.md)
