filter.TidySet {BaseSet}R Documentation

Filter TidySet

Description

Use filter to subset the TidySet object. You can use activate with filter or use the specific function. The S3 method filters using all the information on the TidySet.

Usage

## S3 method for class 'TidySet'
filter(.data, ...)

filter_set(.data, ...)

filter_element(.data, ...)

filter_relation(.data, ...)

Arguments

.data

The TidySet object.

...

The logical predicates in terms of the variables of the sets.

Value

A TidySet object.

See Also

dplyr::filter() and activate()

Other methods: TidySet-class, activate(), add_column(), add_relation(), arrange.TidySet(), cartesian(), complement_element(), complement_set(), complement(), element_size(), elements(), group_by.TidySet(), group(), incidence(), intersection(), is.fuzzy(), is_nested(), move_to(), mutate.TidySet(), nElements(), nRelations(), nSets(), name_elements<-(), name_sets<-(), name_sets(), power_set(), pull.TidySet(), relations(), remove_column(), remove_element(), remove_relation(), remove_set(), rename_elements(), rename_set(), select.TidySet(), set_size(), sets(), subtract(), union()

Examples

relations <- data.frame(
    sets = c(rep("a", 5), "b", rep("a2", 5), "b2"),
    elements = rep(letters[seq_len(6)], 2),
    fuzzy = runif(12),
    type = c(rep("Gene", 4), rep("lncRNA", 2))
)
TS <- tidySet(relations)
TS <- move_to(TS, from = "relations", to = "elements", column = "type")
filter(TS, elements == "a")
# Equivalent to filter_relation
filter(TS, elements == "a", sets == "a")
filter_relation(TS, elements == "a", sets == "a")
# Filter element
filter_element(TS, type == "Gene")
# Filter sets and by property of elements simultaneously
filter(TS, sets == "b", type == "lncRNA")
# Filter sets
filter_set(TS, sets == "b")

[Package BaseSet version 0.9.0 Index]