Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

activate

Determine the context of subsequent manipulations.


Description

Functions to help to perform some action to just some type of data: elements, sets or relations. activate: To table the focus of future manipulations: elements, sets or relations. active: To check the focus on the TidySet. deactivate: To remove the focus on a specific TidySet-

Usage

activate(.data, what)

active(.data)

deactivate(.data)

Arguments

.data

A TidySet object.

what

Either "elements", "sets" or "relations"

Value

A TidySet object.

See Also

Examples

relations <- data.frame(
    sets = c(rep("a", 5), "b", rep("a2", 5), "b2"),
    elements = rep(letters[seq_len(6)], 2),
    fuzzy = runif(12)
)
a <- tidySet(relations)
elements(a) <- cbind(elements(a),
    type = c(rep("Gene", 4), rep("lncRNA", 2))
)
# Filter in the whole TidySet
filter(a, elements == "a")
filter(a, elements == "a", type == "Gene")
# Equivalent to filter_elements
filter_element(a, type == "Gene")
a <- activate(a, "elements")
active(a)
filter(a, type == "Gene")
a <- deactivate(a)
active(a)
filter(a, type == "Gene")

BaseSet

Working with Sets the Tidy Way

v0.0.16
MIT + file LICENSE
Authors
Lluís Revilla Sancho [aut, cre] (<https://orcid.org/0000-0001-9747-2570>), Zebulun Arendsee [rev], Jennifer Chang [rev]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.