MAEFilteredDataset
R6
class
MAEFilteredDataset
R6
class
Super class
teal.slice::FilteredDataset
-> MAEFilteredDataset
Methods
Inherited methods
teal.slice::FilteredDataset$clear_filter_states()
teal.slice::FilteredDataset$finalize()
teal.slice::FilteredDataset$format()
teal.slice::FilteredDataset$get_call()
teal.slice::FilteredDataset$get_dataname()
teal.slice::FilteredDataset$get_dataset()
teal.slice::FilteredDataset$get_dataset_label()
teal.slice::FilteredDataset$get_filter_state()
teal.slice::FilteredDataset$get_keys()
teal.slice::FilteredDataset$print()
teal.slice::FilteredDataset$srv_active()
teal.slice::FilteredDataset$srv_add()
teal.slice::FilteredDataset$ui_active()
Method new()
Initialize MAEFilteredDataset
object.
Usage
MAEFilteredDataset$new(
dataset,
dataname,
keys = character(0),
label = character(0)
)
Method set_filter_state()
Set filter state.
Method remove_filter_state()
Remove one or more FilterState
of a MAEFilteredDataset
.
Method get_filter_overview()
Creates row for filter overview in the form of dataname -- observations (remaining/total) -- subjects (remaining/total)
- MAE
Examples
# use non-exported function from teal.slice
MAEFilteredDataset <- getFromNamespace("MAEFilteredDataset", "teal.slice")
data(miniACC, package = "MultiAssayExperiment")
dataset <- MAEFilteredDataset$new(miniACC, "MAE")
fs <- teal_slices(
teal_slice(
dataname = "MAE", varname = "years_to_birth", selected = c(30, 50), keep_na = TRUE
),
teal_slice(
dataname = "MAE", varname = "vital_status", selected = "1", keep_na = FALSE
),
teal_slice(
dataname = "MAE", varname = "gender", selected = "female", keep_na = TRUE
),
teal_slice(
dataname = "MAE", varname = "ARRAY_TYPE", selected = "", keep_na = TRUE
)
)
dataset$set_filter_state(state = fs)
#> Warning: filters for columns: ARRAY_TYPE excluded from MAE
library(shiny)
isolate(dataset$get_filter_state())
#> {
#> "slices": [
#> {
#> "dataname" : "MAE",
#> "varname" : "years_to_birth",
#> "id" : "MAE years_to_birth",
#> "choices" : [14, 83],
#> "selected" : [30, 50],
#> "keep_na" : true,
#> "fixed" : false,
#> "anchored" : false,
#> "multiple" : true
#> },
#> {
#> "dataname" : "MAE",
#> "varname" : "vital_status",
#> "id" : "MAE vital_status",
#> "choices" : ["0", "1"],
#> "selected" : ["1"],
#> "keep_na" : false,
#> "fixed" : false,
#> "anchored" : false,
#> "multiple" : true
#> },
#> {
#> "dataname" : "MAE",
#> "varname" : "gender",
#> "id" : "MAE gender",
#> "choices" : ["female", "male"],
#> "selected" : ["female"],
#> "keep_na" : true,
#> "fixed" : false,
#> "anchored" : false,
#> "multiple" : true
#> }
#> ],
#> "attributes": {
#> "include_varnames" : {
#> "MAE" : ["patientID", "years_to_birth", ...
#> },
#> "count_type" : "none",
#> "allow_add" : true
#> }
#> }