resolve_delayed {teal.transform} | R Documentation |
Resolve delayed inputs by evaluating the code within the provided datasets
Description
Usage
resolve_delayed(x, datasets, keys)
## S3 method for class 'FilteredData'
resolve_delayed(
x,
datasets,
keys = sapply(datasets$datanames(), datasets$get_keys, simplify = FALSE)
)
## S3 method for class 'list'
resolve_delayed(x, datasets, keys = NULL)
Arguments
x |
( |
datasets |
( |
keys |
(named |
Value
Resolved object.
Methods (by class)
-
resolve_delayed(FilteredData)
: Default values forkeys
parameters is extracted fromdatasets
. -
resolve_delayed(list)
: Generic method whendatasets
argument is a named list.
Examples
library(shiny)
ADSL <- teal.transform::rADSL
isolate({
data_list <- list(ADSL = reactive(ADSL))
# value_choices example
v1 <- value_choices("ADSL", "SEX", "SEX")
v1
resolve_delayed(v1, data_list)
# variable_choices example
v2 <- variable_choices("ADSL", c("BMRKR1", "BMRKR2"))
v2
resolve_delayed(v2, data_list)
# data_extract_spec example
adsl_filter <- filter_spec(
vars = variable_choices("ADSL", "SEX"),
sep = "-",
choices = value_choices("ADSL", "SEX", "SEX"),
selected = "F",
multiple = FALSE,
label = "Choose endpoint and Censor"
)
adsl_select <- select_spec(
label = "Select variable:",
choices = variable_choices("ADSL", c("BMRKR1", "BMRKR2")),
selected = "BMRKR1",
multiple = FALSE,
fixed = FALSE
)
adsl_de <- data_extract_spec(
dataname = "ADSL",
select = adsl_select,
filter = adsl_filter
)
resolve_delayed(adsl_filter, datasets = data_list)
resolve_delayed(adsl_select, datasets = data_list)
resolve_delayed(adsl_de, datasets = data_list)
# nested list (arm_ref_comp)
arm_ref_comp <- list(
ARMCD = list(
ref = variable_choices("ADSL"),
comp = variable_choices("ADSL")
)
)
resolve_delayed(arm_ref_comp, datasets = data_list)
})
[Package teal.transform version 0.5.0 Index]