store_null: No storage on disk

Description Usage Arguments Examples

View source: R/storage.R

Description

Doesn't write anything, special inputs created by track_usage are available in server and optionally logs are printed in console.

Usage

1
store_null(console = TRUE)

Arguments

console

Print logs in R console.

Examples

 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)

}

karimelghazouly/shinylogs_modified documentation built on Jan. 9, 2021, 12:37 a.m.