Closed AndersAskeland closed 3 months ago
To allow list arguments one can use
tidyr::pivot_wider(
names_from = day,
values_from = dplyr::starts_with("value"),
names_glue = "{.value}_day_{day}"
)
Potentially also add an across to remove value.
|>
dplyr::rename_with(\(x) stringr::str_remove(x, "value_"))
Gives prettier output .
Code: