over
over.Rd
Define a windowing column.
Examples
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)
} # }