element_funs: Functions applied to elements in a 'BiocSet' object

element_funsR Documentation

Functions applied to elements in a BiocSet object

Description

All of the major methods applied to a BiocSet object can be explicitly applied to the element tibble. These functions bypass the need to use the es_activate function by indicating what function should be used on the element tibble.

Usage

filter_element(.data, ...)

select_element(.data, ...)

mutate_element(.data, ...)

summarise_element(.data, ...)

arrange_element(.data, ...)

left_join_element(.data, ...)

tibble_from_element(.data, how = unlist)

data.frame_from_element(.data, how = unlist)

Arguments

.data

A BiocSet object.

...

Additional arguments passed to the function.

how

Multiple entries will become a list.

Value

A BiocSet object.

For tibble_from_element, a tibble.

For data.frame_from_element, a data.frame.

Examples

es <- BiocSet(set1 = letters, set2 = LETTERS)
filter_element(es, element == "a")

es %>% select_element(element)

es %>% mutate_element(pval = rnorm(1:52))

es %>% summarise_element(n = n())

es %>% arrange_element(desc(element))

tbl <- tibble(x = 1:5, y = letters[1:5])
es <- BiocSet(set1 = letters[c(1,3,5)], set2 = letters[c(2,4)])
left_join_element(es, tbl, by = c(element = "y"))

tibble_from_element(es)

data.frame_from_element(es)

Bioconductor/BiocSet documentation built on Feb. 9, 2024, 9:12 p.m.