Given the introduction of the .by syntax, I wonder if it would be worth while changing this nice little helper message to use that making it a little smaller:
So that would change this:
|
cli::cli_warn(c( |
|
"Values from {duplicate_names} are not uniquely identified; output will contain list-cols.", |
|
"*" = "Use `values_fn = list` to suppress this warning.", |
|
"*" = "Use `values_fn = {{summary_fun}}` to summarise duplicates.", |
|
"*" = "Use the following dplyr code to identify duplicates.", |
|
" " = " {{data}} %>%", |
|
" " = " dplyr::group_by({group_cols}) %>%", |
|
" " = " dplyr::summarise(n = dplyr::n(), .groups = \"drop\") %>%", |
|
" " = " dplyr::filter(n > 1L)" |
|
)) |
|
} |
to this:
cli::cli_warn(c(
"Values from {duplicate_names} are not uniquely identified; output will contain list-cols.",
"*" = "Use `values_fn = list` to suppress this warning.",
"*" = "Use `values_fn = {{summary_fun}}` to summarise duplicates.",
"*" = "Use the following dplyr code to identify duplicates.",
" " = " {{data}} %>%",
" " = " dplyr::summarise(n = dplyr::n(), .by = c({group_cols})) %>%",
" " = " dplyr::filter(n > 1L)"
))
}
Given the introduction of the
.bysyntax, I wonder if it would be worth while changing this nice little helper message to use that making it a little smaller:So that would change this:
tidyr/R/pivot-wide.R
Lines 439 to 449 in 0764e65
to this: