Description Usage Arguments Value See Also Examples
View source: R/list-dependencies.R
Shows a tree view of reactive dependencies.
1 2 3 | listDependencies(x = getCurrentContext(), graph = getReactGraph(),
invalidated = FALSE, depth = NULL, status = TRUE, value = FALSE,
srcref = FALSE, quiet = FALSE, file = "", append = FALSE)
|
x |
A reactive context, expression, observer. Defaults to the current reactive context. |
graph |
A reactive graph. Defaults to the reactive graph for the current Shiny session. |
invalidated |
If |
depth |
Max depth of the dependency tree to display. |
status |
If |
value |
If |
srcref |
If |
quiet |
If |
file |
A filename or connection to print to. Defaults to |
append |
If |
A nested list of dependencies.
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 | library(shiny)
options(shiny.reactlog = TRUE)
valA <- reactiveVal(1, label = "valA")
valB <- reactiveVal(2, label = "valB")
rxA <- reactive({
valA()
})
rxB <- reactive({
valB()
})
rxAB <- reactive({
valA() + valB()
})
obs <- observe({
listDependencies()
rxA() + rxB() + rxAB()
}, label = "obs")
observe(valA(3))
# trigger flush event (happens automatically in a Shiny app)
shiny:::flushReact()
listDependencies(obs, depth = 0, srcref = TRUE)
## Not run:
# show the entire dependency tree
listDependencies()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.