Last active
June 2, 2018 15:14
-
-
Save raduromaniuc/e98635c75ac696495476634563131db8 to your computer and use it in GitHub Desktop.
renderWordcloud2 blocks renderPlot from initially rendering
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(shinydashboard) | |
library(wordcloud2) | |
data <- data.frame(term = c("A", "B", "C", "D", "E"), count = c(10, 15, 3, 5, 7)) | |
body <- dashboardBody( | |
fluidRow( | |
box( | |
plotOutput("barplot"), | |
wordcloud2Output("wordcloud") | |
) | |
) | |
) | |
server <- function(input, output) { | |
output$wordcloud <- renderWordcloud2({ wordcloud2(data) }) | |
output$barplot <- renderPlot({ barplot(data$count, names.arg = data$term) }) | |
} | |
shinyApp(dashboardPage(dashboardHeader(), dashboardSidebar(), body), server) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment