Description Usage Arguments Examples
Doesn't write anything, special inputs created by track_usage
are available in server and optionally logs are printed in console.
1 | store_null(console = TRUE)
|
console |
Print logs in R console. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | if (interactive()) {
library(shiny)
library(shinylogs)
ui <- fluidPage(
tags$h2("Record inputs change"),
fluidRow(
column(
width = 3,
selectInput(
inputId = "select",
label = "Select input",
choices = month.name
),
numericInput(
inputId = "numeric",
label = "Numerci input",
value = 4,
min = 0, max = 20
),
checkboxGroupInput(
inputId = "checkboxGroup",
label = "Checkbox group input",
choices = LETTERS[1:5]
),
sliderInput(
inputId = "slider",
label = "Slider input",
min = 0, max = 100, value = 50
)
),
column(
width = 9,
tags$b("Last input:"),
verbatimTextOutput(outputId = "last_input"),
tags$b("Last input:"),
verbatimTextOutput(outputId = "all_inputs")
)
)
)
server <- function(input, output, session) {
track_usage(
storage_mode = store_null() # dont store on disk
)
output$last_input <- renderPrint({
input$.shinylogs_lastInput # last input triggered
})
output$all_inputs <- renderPrint({
input$.shinylogs_input # all inputs that have changed
})
}
shinyApp(ui, server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.