diff --git a/082-word-cloud/server.R b/082-word-cloud/server.R index d6e49337..33075f50 100644 --- a/082-word-cloud/server.R +++ b/082-word-cloud/server.R @@ -29,4 +29,11 @@ function(input, output, session) { min.freq = input$freq, max.words=input$max, colors=brewer.pal(8, "Dark2")) }) + + # tm depends on NLP which causes NLP::annotate to override + # ggplot2::annotate when calling `library(ggplot2); library(tm)` + session$onSessionEnded(function() { + unloadNamespace("tm") + unloadNamespace("NLP") + }) }