如何在R ShinyDashBoard中使用OnClick操作按钮

时间:2016-12-16 14:18:38

标签: shiny shinydashboard shinyjs

我正在使用R和闪亮的仪表板对Twitter数据进行情绪分析。 我已经绘制了正面,负面和中性推文的信息价值框。

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")
    )
  })

我已经展示了使用

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

      tableOutput("positivitweets")

现在我想点击那个百分比值框,然后它会显示该框下方的正面推文。

我是HTML和JAVASCRIPT的新手,开始学习。

0 个答案:

没有答案
相关问题