FilterStates
R6 class
FilteredDataset.Rd
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
Method new()
Initializes this FilteredDataset
object
Usage
FilteredDataset$new(
dataset,
dataname,
keys = character(0),
label = attr(dataset, "label"),
metadata = NULL
)
Arguments
dataset
(
data.frame
orMultiAssayExperiment
)
single dataset for which filters are rendereddataname
(
character(1)
)
A given name for the dataset it may not contain spaceskeys
optional, (
character
)
Vector with primary keyslabel
(
character(1)
)
Label to describe the datasetmetadata
(named
list
orNULL
)
Field containing metadata about the dataset. Each element of the list should be atomic and length one.
Method get_formatted_filter_state()
Returns a string representation of the filter state in this FilteredDataset
.
Method get_call()
Gets a filter expression
This functions 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.
Method get_filter_state()
Method get_filter_states()
Gets the active FilterStates
objects.
Usage
FilteredDataset$get_filter_states(id = character(0))
Method get_dataset()
Gets the dataset object in this FilteredDataset
Method get_filter_overview_info()
Get filter overview rows of a dataset
The output shows the comparison between filtered_dataset
function parameter and the dataset inside self
Method get_keys()
Gets the keys for the dataset of this FilteredDataset
Method get_varlabels()
Gets labels of variables in the data
Variables are the column names of the data.
Either, all labels must have been provided for all variables
in set_data
or NULL
.
Method get_dataset_label()
Gets the dataset label
Method get_filterable_varnames()
Gets variable names for the filtering.
It takes the intersection of the column names
of the data and private$filterable_varnames
if
private$filterable_varnames
has positive length
Method set_filterable_varnames()
Set the allowed filterable variables
Arguments
varnames
(
character
orNULL
) The variables which can be filtered Seeself$get_filterable_varnames
for more details
Method ui()
UI module for dataset active filters
UI module containing dataset active filters along with title and remove button.
Method server()
Server module for a dataset active filters
Server module managing a active filters.
Method ui_add_filter_state()
UI module to add filter variable for this dataset
UI module to add filter variable for this dataset
Method srv_add_filter_state()
Server module to add filter variable for this dataset
Server module to add filter variable for this dataset