ggalluvial icon indicating copy to clipboard operation
ggalluvial copied to clipboard

`spread_()` was deprecated in tidyr 1.2.0.

Open dcarbajo opened this issue 2 years ago • 0 comments

It seems like after upgrade to R version 4.2.0, the following warning pops up, in case you want to check it:

Warning message:
`spread_()` was deprecated in tidyr 1.2.0.
Please use `spread()` instead.
This warning is displayed once every 8 hours.
Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.

This seems to always happen, a simple MWE like the one below can reproduce it:

ucb_df <- as.data.frame(UCBAdmissions)
ucb_lodes <- ggalluvial::to_lodes_form(ucb_df, axes = 2:3, id = "cohort")

P <- ggplot2::ggplot(ucb_lodes, ggplot2::aes(x = x, stratum = stratum, y = Freq)) +
  ggalluvial::stat_stratum(geom = "stratum", alpha = .5, ggplot2::aes(fill = stratum)) +
  ggalluvial::stat_stratum(geom = "text", ggplot2::aes(label = stratum), size = 3) +
  ggalluvial::geom_flow(ggplot2::aes(alluvium = cohort, fill = stratum)) +
  ggplot2::scale_y_continuous(name="Freq") +
  ggplot2::theme_light()
grDevices::pdf(file="test.pdf", height=6, width=8)
print(P)
grDevices::dev.off()

Thanks!

dcarbajo avatar Jun 07 '22 08:06 dcarbajo