FilteredDataset is a class which renders/controls FilterStates(s)
Each FilteredDataset contains filter_states field - a list which contains one
(data.frame) or multiple (MultiAssayExperiment) FilterStates objects.
Each FilterStates is responsible for one filter/subset expression applied for specific
components of the dataset.
Methods
Initializes this FilteredDataset object.
Arguments
dataset
any object
dataname
(character(1))
syntactically valid name given to the dataset.
keys
(character) optional
vector of primary key column names.
label
(character(1))
label to describe the dataset.
Returns
Object of class FilteredDataset, invisibly.
Returns a formatted string representing this FilteredDataset object.
Usage
FilteredDataset$format(show_all = FALSE, trim_lines = TRUE)
Arguments
show_all
(logical(1)) passed to format.teal_slice.
trim_lines
(logical(1)) passed to format.teal_slice.
Returns
The formatted character string.
Prints this FilteredDataset object.
Usage
FilteredDataset$print(...)
Arguments
...
additional arguments passed to format.
Removes all filter items applied to this dataset.
Usage
FilteredDataset$clear_filter_states(force = FALSE)
Arguments
force
(logical(1))
flag specifying whether to include anchored filter states.
Method get_call()
Gets a filter expression.
This function returns filter calls equivalent to selected items
within each of filter_states. Configuration of the calls is constant and
depends on filter_states type and order which are set during initialization.
Usage
FilteredDataset$get_call(sid = "")
Arguments
sid
(character)
when specified, the method returns code containing conditions calls of
FilterState objects with sid different to this sid argument.
Returns
Either a list of filter calls, or NULL.
Gets states of all contained FilterState objects.
Usage
FilteredDataset$get_filter_state()
Returns
A teal_slices object.
Set filter state.
Usage
FilteredDataset$set_filter_state(state)
Returns
Virtual method, returns nothing and raises error.
Method get_dataname()
Gets the name of the dataset.
Usage
FilteredDataset$get_dataname()
Returns
A character string.
Method get_dataset()
Gets the dataset object in this FilteredDataset.
Usage
FilteredDataset$get_dataset(filtered = FALSE)
Returns
The stored dataset. If data.frame or MultiAssayExperiment,
either raw or as a reactive with current filters applied (depending on filtered).
Method get_filter_overview()
Get filter overview of a dataset.
Usage
FilteredDataset$get_filter_overview()
Returns
Virtual method, returns nothing and raises an error.
Method get_keys()
Gets the key columns for this dataset.
Usage
FilteredDataset$get_keys()
Returns
Character vector of variable names
Method get_dataset_label()
Gets the dataset label.
Usage
FilteredDataset$get_dataset_label()
Returns
Character string.
Method ui_active()
shiny module containing active filters for a dataset, along with a title and a remove button.
Usage
FilteredDataset$ui_active(id, allow_add = TRUE)
Arguments
id
(character(1))
shiny module instance id.
allow_add
(logical(1))
logical flag specifying whether the user will be able to add new filters
Method srv_active()
Server module for a dataset active filters.
Usage
FilteredDataset$srv_active(id)
Arguments
id
(character(1))
shiny module instance id.
Method ui_add()
UI module to add filter variable for this dataset.
Usage
FilteredDataset$ui_add(id)
Arguments
id
(character(1))
shiny module instance id.
Returns
Virtual method, returns nothing and raises error.
Method srv_add()
Server module to add filter variable for this dataset.
For this class srv_add calls multiple modules
of the same name from FilterStates as MAEFilteredDataset
contains one FilterStates object for colData and one for each experiment.
Usage
FilteredDataset$srv_add(id)
Arguments
id
(character(1))
shiny module instance id.
Method finalize()
Object and dependencies cleanup.
Usage
FilteredDataset$finalize()
Method clone()
The objects of this class are cloneable with this method.
Usage
FilteredDataset$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.