SparkR (version 2.4.6)

rowsBetween: rowsBetween

Description

Defines the frame boundaries, from start (inclusive) to end (inclusive).

Usage

rowsBetween(x, start, end)

# S4 method for WindowSpec,numeric,numeric rowsBetween(x, start, end)

Arguments

x

a WindowSpec

start

boundary start, inclusive. The frame is unbounded if this is the minimum long value.

end

boundary end, inclusive. The frame is unbounded if this is the maximum long value.

Value

a WindowSpec

Details

Both start and end are relative positions from the current row. For example, "0" means "current row", while "-1" means the row before the current row, and "5" means the fifth row after the current row.

See Also

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

Examples

Run this code
# NOT RUN {
  rowsBetween(ws, 0, 3)
# }

Run the code above in your browser using DataLab