From 873705ca9917a2a76756f5310ad44f853052cabc Mon Sep 17 00:00:00 2001 From: Carson Date: Mon, 1 Nov 2021 16:38:46 -0500 Subject: [PATCH] Close #2013: more careful joining of group columns --- R/ggplotly.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/R/ggplotly.R b/R/ggplotly.R index c9ccda8bc7..acaceee702 100644 --- a/R/ggplotly.R +++ b/R/ggplotly.R @@ -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)