Skip to content

Commit

Permalink
refactor assign_round_number
Browse files Browse the repository at this point in the history
  • Loading branch information
truenomad committed Feb 6, 2025
1 parent d235fc9 commit 3cdd61f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/assign_round_number.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ assign_round_number <- function(df,

# Create a round group label for the distinct dates
distinct_dates$ClusterID <- clusters
round_labels <- unique(format(distinct_dates[[date_col]], "%B %Y"))
round_labels <- unique(format(distinct_dates[[date_col]], "%b %Y"))

# Create round group labels based on clusters
distinct_dates <- distinct_dates |>
dplyr::group_by(ClusterID) |>
dplyr::mutate(
round_group = format(dplyr::first(.data[[date_col]]), "%B %Y")
round_group = format(dplyr::first(.data[[date_col]]), "%b %Y")
) |>
dplyr::ungroup()

Expand Down

0 comments on commit 3cdd61f

Please sign in to comment.