We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4878717 commit 2dccd33Copy full SHA for 2dccd33
apps/countdown/server.R
@@ -1,7 +1,9 @@
1
library(shiny)
2
+library(lubridate)
3
4
title <- 'Data Visualization 4'
5
subtitle <- 'Data Visualization in Production with Shiny'
6
+schedule <- as.POSIXct('2023-04-24 11:30:00')
7
8
server <- function(input, output) {
9
output$title <- renderText(title)
@@ -11,6 +13,6 @@ server <- function(input, output) {
11
13
## as there's no external dependency triggering changes here (e.g. an input change)
12
14
## that would automatically update this object to reactive
15
invalidateLater(250)
- as.character(Sys.time())
16
+ as.character(round(as.period(schedule - Sys.time())))
17
})
18
}
0 commit comments