countup_start: Start

Description Usage Arguments Value Examples

View source: R/proxy.R

Description

Start the counter.

Usage

1
countup_start(counter)

Arguments

counter

An object of class countupProxy as returned by countupProxy().

Value

The counter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
library(shiny)

ui <- fluidPage(
  countupOutput("cnt"),
  actionButton("start", "start")
)

server <- function(input, output, session) {

  output$cnt <- renderCountup({
    countup(24, start = FALSE)
  })

  observeEvent(input$start, {
    countupProxy("cnt") %>% 
      countup_start()
  })

}

## Not run: shinyApp(ui, server)

JohnCoene/countup documentation built on Aug. 24, 2020, 8:58 p.m.