countup_update: Update

Description Usage Arguments Value Examples

View source: R/proxy.R

Description

Update the counter.

Usage

1

Arguments

counter

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

update

Integer to update to.

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("Update", "start")
)

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

  output$cnt <- renderCountup({
    countup(24)
  })

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

}

## Not run: shinyApp(ui, server)

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