Compute running numbers in a data frame. Without specifying a by variable results in the row number. With by variable computes the running number within each group of expressions.
Examples
# Example data frame
my_data <- dummy_data(1000)
# Get row numbers
my_data <- my_data |> running_number()
my_data <- my_data |> running_number("row_number")
# Running number per variable expression
my_data <- my_data |> running_number(by = year)