Set height and width in wordloud displayed in a shiny app

537 Views Asked by At

Is there any way to adjust the width and height of wordloud except of its size in order cover the whole screen in shiny app?

if(require(shiny)){
  library(wordcloud2)
  wordcloud2(data = demoFreq)
  
  # Global variables can go here
  n <- 1
  
  # Define the UI
  ui <- bootstrapPage(
    numericInput('size', 'Size of wordcloud', n),
    wordcloud2Output('wordcloud2')
  )
  
  
  # Define the server code
  server <- function(input, output) {
    output$wordcloud2 <- renderWordcloud2({
      # wordcloud2(demoFreqC, size=input$size)
      wordcloud2(demoFreq, size=input$size)
    })
  }
  # Return a Shiny app object
  # Sys.setlocale("LC_CTYPE","chs") #if you use Chinese character
  ## Do not Run!
  shinyApp(ui = ui, server = server)
}
0

There are 0 best solutions below