Aggregation (dplyr::summarise) functions and window functions (dplyr::lead, lag, top_n etc.) operate on rows only. Aggregation functions output single row from an input of a group of rows. Window functions output one row per input row.
Aggregation (dplyr::summarise) functions and window functions (dplyr::lead, lag, top_n etc.) operate on rows only. Aggregation functions output single row from an input of a group of rows. Window functions output one row per input row.