as.data.frame.pareg: as.data.frame for an object of class 'pareg'.

View source: R/utils.R

as.data.frame.paregR Documentation

as.data.frame for an object of class pareg.

Description

Retrieve dataframe with enrichment information.

Usage

## S3 method for class 'pareg'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

Arguments

x

An object of class pareg.

row.names

Optional character vector of rownames.

optional

Allow optional arguments.

...

Additional arguments.

Value

Dataframe containing enrichment score and name for each pathway.

Examples

df_genes <- data.frame(
  gene = paste("g", 1:20, sep = ""),
  pvalue = c(
    rbeta(10, .1, 1),
    rbeta(10, 1, 1)
  )
)
df_terms <- rbind(
  data.frame(
    term = "foo",
    gene = paste("g", 1:10, sep = "")
  ),
  data.frame(
    term = "bar",
    gene = paste("g", 11:20, sep = "")
  )
)
fit <- pareg(df_genes, df_terms, max_iterations = 10)
as.data.frame(fit)

cbg-ethz/pareg documentation built on July 20, 2023, 7:30 p.m.