shiny_events_to_log: Record Shiny events on a LOG file

Description Usage Arguments Value Examples

View source: R/shiny_events.R

Description

Record Shiny events on a LOG file

Usage

1
2
shiny_events_to_log(app = basename(getwd()),
  filename = "shiny-events.log")

Arguments

app

The name of the app. Defaults to the name of the script's containing folder.

filename

CSV file name to use. Defaults to "shiny-events.csv"

Value

An environment variable containing: a GUID, the name of the app, entry() function and event() function.

Examples

1
2
3
4
5
6
file_name <- tempfile(fileext = ".csv")
tracker <- shiny_events_to_log("example-app", file_name)
tracker$event("slider", 1)
# event() function allows the log type to be modified
tracker$event("records-returned", 0, type = "WARN")
readLines(file_name)

edgararuiz/shinyevents documentation built on Nov. 4, 2019, 11:33 a.m.