| register_input_state | R Documentation |
Registers a value that the MCP tool shiny_input_info
reports next to the inputs, under the key "@state". Use it for
state that changes what an agent should ask, for example whether the
data loader is open (a closed loader usually means the data are loaded
and the user wants to change analysis inputs only).
register_input_state(
name,
getter,
description = "",
session = shiny::getDefaultReactiveDomain()
)
name |
character string, the name of the state |
getter |
a function without arguments that returns the current
value; it is called in |
description |
character string: what the value means, for agents |
session |
the |
NULL, invisibly
## Not run:
# in a module server function
register_input_state(
"loader_opened",
function() isTRUE(loader_is_open()),
description = "TRUE while the data loader is open"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.