Nothing
NULL
.as_state <- function(x) {
if (is.null(x)) return(structure(list(), class = "flux_state"))
stopifnot(is.list(x))
structure(x, class = "flux_state")
}
#' @export
#' @method [ flux_state
#' @noRd
`[.flux_state` <- function(x, i, ...) {
if (missing(i)) return(x)
# single index: behave like [[ for backward-compatibility with older
# vector-based state() returns (where x["var"] produced the value).
if (length(i) == 1L) return(x[[i]])
# multiple indices: keep list subset semantics
x[i]
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.