View source: R/data_extract_spec.R
data_extract_spec | R Documentation |
teal
modulesThe Data extract input can be used to filter and select columns from a data set.
This function enables such an input in teal
.
Please use the constructor function data_extract_spec to set it up.
data_extract_spec(dataname, select = NULL, filter = NULL, reshape = FALSE)
dataname |
( |
select |
( |
filter |
( |
reshape |
( |
data_extract_spec
object.
teal.transform
uses this object to construct a UI element in a module.
No checks based on columns can be done because the data is only referred to by name.
select_spec filter_spec
adtte_filters <- filter_spec(
vars = c("PARAMCD", "CNSR"),
sep = "-",
choices = c("OS-1" = "OS-1", "OS-0" = "OS-0", "PFS-1" = "PFS-1"),
selected = "OS-1",
multiple = FALSE,
label = "Choose endpoint and Censor"
)
data_extract_spec(
dataname = "ADTTE",
filter = adtte_filters,
select = select_spec(
choices = c("AVAL", "BMRKR1", "AGE"),
selected = c("AVAL", "BMRKR1"),
multiple = TRUE,
fixed = FALSE,
label = "Column"
)
)
data_extract_spec(
dataname = "ADSL",
filter = NULL,
select = select_spec(
choices = c("AGE", "SEX", "USUBJID"),
selected = c("SEX"),
multiple = FALSE,
fixed = FALSE
)
)
data_extract_spec(
dataname = "ADSL",
filter = filter_spec(
vars = variable_choices("ADSL", subset = c("AGE"))
)
)
dynamic_filter <- filter_spec(
vars = choices_selected(variable_choices("ADSL"), "COUNTRY"),
multiple = TRUE
)
data_extract_spec(
dataname = "ADSL",
filter = dynamic_filter
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.