combine-SparrowResult-SparrowResult-method: Combines two SparrowResult objects together.

combine,SparrowResult,SparrowResult-methodR Documentation

Combines two SparrowResult objects together.

Description

This would be useful when you want to add a GSEA result to an already existing one. append would be more appropriate, but ...

Usage

## S4 method for signature 'SparrowResult,SparrowResult'
combine(x, y, rename.x = NULL, rename.y = NULL, ...)

Arguments

x

A SparrowResult object

y

A SparrowResult object

rename.x

A named vector that used to match resultNames(x) and remane them to something different. names(rename.x) should match whatever you want to change in resultNames(x), and the values are the new names of the result.

rename.y

Same as rename.x, but for the results in y.

...

more things

Details

When would you want to do that? Imagine a shiny app that drives sparrow. You might want to present the results of each analysis as they come "online", so you would run them independently and make them available to the user immediately after they each finish (ie. in combination with the promises package).

Value

A combined SparrowResult object

Examples

mg1 <- exampleSparrowResult()
mg2 <- exampleSparrowResult()
mgc <- combine(mg1, mg2)

lianos/sparrow documentation built on Feb. 5, 2024, 2:58 p.m.