Skip to content

Commit

Permalink
More careful joining of group columns (#2064)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert authored Nov 2, 2021
1 parent df35a7d commit 49215db
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/ggplotly.R
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,11 @@ gg2list <- function(p, width = NULL, height = NULL,
x <- reComputeGroup(x, z)
# dplyr issue??? https://github.com/tidyverse/dplyr/issues/2701
attr(y$group, "n") <- NULL
# https://github.com/plotly/plotly.R/issues/2013
if (!identical(class(x$group), class(y$group))) {
x$group <- as.character(x$group)
y$group <- as.character(y$group)
}
suppressMessages(dplyr::left_join(x, y))
}, data, nestedKeys, layers)

Expand Down

0 comments on commit 49215db

Please sign in to comment.