Description Usage Arguments Examples
A pair of UI and server functions: tsibbleWrapUI()
and tsibbleWrapServer()
.
1 2 3 | tsibbleWrapUI(id)
tsibbleWrapServer(id, plot, period)
|
id |
A unique shiny id. |
plot |
A |
period |
A string passed to |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | if (interactive()) {
library(tsibble)
library(dplyr)
library(shiny)
library(ggplot2)
p <- tourism %>%
filter(Region %in% c("Melbourne", "Sydney")) %>%
ggplot(aes(x = Quarter, y = Trips, colour = Region)) +
geom_line() +
facet_wrap(~ Purpose, scales = "free_y") +
theme(legend.position = "none")
ui <- fluidPage(tsibbleWrapUI("dice"))
server <- function(input, output, session) {
tsibbleWrapServer("dice", p, period = "1 year")
}
shinyApp(ui, server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.