corpus_size: Obtain the size of different corpora

corpus_sizeR Documentation

Obtain the size of different corpora

Description

Obtains the size of a certain number of predefined corpora. The total size of a corpus is important for calculating term frequencies. That is, for a given corpus, the possible range for any term frequency is between 0 and the corpus size.

Usage

corpus_size(
  corpus = c("taxon-annotations", "taxon-variation", "annotated-taxa",
    "gene-annotations", "genes", "states")
)

Arguments

corpus

the name of the corpus, see term_freqs() for allowed values.

Details

Corpus sizes are cached per session after they have first been obtained. Thus, if the Phenoscape KB changes, a session needs to be restarted to have those changes be reflected.

Value

The total size of the specified corpus as an integer number.

Examples

corpus_size("taxon-variation")
corpus_size("annotated-taxa")
corpus_size("states")
corpus_size("genes")

xu-hong/rphenoscape documentation built on Jan. 28, 2024, 12:22 p.m.