How to use OnClick action buttons in R ShinyDashBoard

335 views Asked by At

I am doing sentiment analysis of twitter data using R and shiny dashboard. I have plotted the persentages valueboxes of positive, negative and neutral tweets.

valueBoxOutput("positivePercent",width = 3)

output$positivePercent <- renderValueBox({

    positivePercent <- round((nrow(positive)*100)/total)

    valueBox(
      value = paste(positivePercent, "%"),
      subtitle = "Positive", 
      color = "green",
      icon = icon("thumbs-up")
    )
  })

And I have shown what are the positive tweets using

tabItem(tabName = "pTweets",
      h2(HTML("<center><b><span style='color: green'>Positive</span> Tweets <i></i></b></center>")),

      tableOutput("positivitweets")

Now here I would like when I click that percentage value box then it should show positive tweets below of that box.

I am completely new to HTML and JAVASCRIPT,started to learn.

0

There are 0 answers