【发布时间】:2014-08-23 09:46:00
【问题描述】:
我正在玩弄闪亮的东西,但无法让最简单的操作按钮示例工作。
在这里找到的第一个示例:http://shiny.rstudio.com/gallery/widgets-gallery.html
下面是代码,是从网站上复制粘贴过来的。
#ui.R
shinyUI(fluidPage(
# Copy the line below to make an action button
actionButton("action", label = "Action"),
hr(),
fluidRow(column(2, verbatimTextOutput("value")))
))
#server.R
shinyServer(function(input, output) {
# You can access the value of the widget with input$action, e.g.
output$value <- renderPrint({ input$action })
})
我的看起来像: http://imgur.com/t0Vx6Wr
编辑: 问题是它还会打印出一些类信息 谢谢
【问题讨论】:
-
看起来对我有用。每次按下按钮,计数器都会增加
标签: r shiny shiny-server