wordcloud2 icon indicating copy to clipboard operation
wordcloud2 copied to clipboard

rmarkdown html multiple wordclouds

Open AlisonCT opened this issue 6 years ago • 3 comments

I am using a wordcloud2 in an rmarkdown html_document. When I include multiple wordclouds the first one works fine but subsequent ones don't display. I can get around this by using saveWidget and webshot to include a png of the wordcloud, but this is not ideal (I like being able to hover over the wordcloud and see the counts). Do you have a solution for this?

Thank you!

AlisonCT avatar Mar 08 '19 05:03 AlisonCT

#32

jl5000 avatar Mar 17 '19 12:03 jl5000

I encountered a similiar problem: Multiple wordcloud2s still don't render in flexdashboard (except for the first one), when they are placed in tabs via Column {.tabset} like in https://rmarkdown.rstudio.com/flexdashboard/layouts.html#tabset_row

maxpel avatar Apr 03 '20 10:04 maxpel

I found a workaround using htmlwidgets package that allows for multiple wordclouds. I'm using quarto to render multiple and this works.

a = wordcloud2::wordcloud2(coffee)

htmlwidgets::saveWidget(widget = a,
                        file = "a.html",
                        selfcontained = TRUE)

jacciz avatar Dec 03 '23 21:12 jacciz