DataStorage | R Documentation |
Abstract R6 Class that encapsulates all the operations needed by Shiny.telemetry to read and write. This removes the complexity from the functions and uses a unified API.
event_bucket
string that identifies the bucket to store user related and action data
new()
initialize data storage object common with all providers
DataStorage$new()
insert()
Insert new data
DataStorage$insert(app_name, type, session = NULL, details = NULL, time = NULL)
app_name
string with name of dashboard (the version can be also included in this string)
type
string that identifies the event type to store
session
(optional) string that identifies a session where the event was logged
details
atomic element of list with data to save in storage
time
date time value indicates the moment the record was
generated in UTC. By default it should be NULL and determined
automatically, but in cases where it should be defined, use Sys.time()
or lubridate::now(tzone = "UTC")
to generate it.
Nothing. This method is called for side effects.
read_event_data()
read all user data from SQLite.
DataStorage$read_event_data(date_from = NULL, date_to = NULL, app_name = NULL)
date_from
(optional) date representing the starting day of results.
date_to
(optional) date representing the last day of results.
app_name
(optional) string identifying the Dashboard-specific event data
close()
Close the connection if necessary
DataStorage$close()
clone()
The objects of this class are cloneable with this method.
DataStorage$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.