extract.GSON: Subset a GSON object

[.GSONR Documentation

Subset a GSON object

Description

x[i] keeps the gene sets selected by i and returns a GSON, with the three mapping tables pruned together: gene2name is filtered by the genes that are still a member of a kept gene set, so the subset cannot grow a reference to a gene that is no longer there. The metadata slots carry over unchanged. x[[i]] returns the genes of one gene set.

Usage

## S3 method for class 'GSON'
x[i, j, ..., drop = FALSE]

## S3 method for class 'GSON'
x[[i, ...]]

Arguments

x

A GSON object.

i

Gene set IDs, or a logical or numeric index into names(x).

j

Unused. Supplying a second index is an error; a GSON is only subset by gene sets.

...

Unused. x[] returns x.

drop

Ignored; a GSON has no dimension to drop.

Value

⁠[.GSON⁠ returns a GSON, ⁠[[.GSON⁠ a character vector of genes.


gson documentation built on Oct. 9, 2026, 5:09 p.m.