Define a windowing column.
Usageover(x, window)
# S4 method for class 'Column,WindowSpec'
over(x, window)
Arguments
a Column, usually one returned by window function(s).
a WindowSpec object. Can be created by windowPartitionBy
or windowOrderBy
and configured by other WindowSpec methods.
if (FALSE) { # \dontrun{
df <- createDataFrame(mtcars)
# Partition by am (transmission) and order by hp (horsepower)
ws <- orderBy(windowPartitionBy("am"), "hp")
# Rank on hp within each partition
out <- select(df, over(rank(), ws), df$hp, df$am)
# Lag mpg values by 1 row on the partition-and-ordered table
out <- select(df, over(lead(df$mpg), ws), df$mpg, df$hp, df$am)
} # }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4