lead {SparkR} | R Documentation |
Window function: returns the value that is 'offset' rows after the current row, and 'null' if there is less than 'offset' rows after the current row. For example, an 'offset' of one will return the next row at any given point in the window partition.
## S4 method for signature 'characterOrColumn,numeric' lead(x, offset, defaultValue = NULL) lead(x, offset, defaultValue = NULL)
x |
Column to compute on |
offset |
Number of rows to offset |
defaultValue |
(Optional) default value to use |
This is equivalent to the LEAD function in SQL.
lead since 1.6.0
Other window_funcs: cume_dist
,
cume_dist
,
cume_dist,missing-method
;
dense_rank
, dense_rank
,
dense_rank,missing-method
;
lag
, lag
,
lag,characterOrColumn-method
;
ntile
, ntile
,
ntile,numeric-method
;
percent_rank
, percent_rank
,
percent_rank,missing-method
;
rank
, rank
,
rank
, rank,ANY-method
,
rank,missing-method
;
row_number
, row_number
,
row_number,missing-method
## Not run: lead(df$c)