# NOT RUN {
ws <- orderBy(windowPartitionBy("key1", "key2"), "key3")
df1 <- select(df, over(lead("value", 1), ws))
ws <- orderBy(windowPartitionBy(df$key1, df$key2), df$key3)
df1 <- select(df, over(lead("value", 1), ws))
# }
Run the code above in your browser using DataLab