esBy: Apply across NanoStringExperiment object by groupings

esByR Documentation

Apply across NanoStringExperiment object by groupings

Description

Group samples or features by variable and apply a function

Group samples or features by variable and apply a function

Usage

esBy(X, GROUP, FUN, ...)

## S4 method for signature 'NanoStringExperiment'
esBy(X, GROUP, FUN, ..., simplify = TRUE)

Arguments

X

NanoStringExperiment object

GROUP

colData header to group by

FUN

function to apply

...

parameters to pass to FUN

simplify

boolean indicating whether to simplify output

Value

list or matrix of results

list or matrix of results

Examples

data(exampleNSEData)
esBy(testExp, 
    GROUP = "cell_line", 
    FUN = function(x) { 
        assayDataApply(x, MARGIN = 1, FUN = mean, elt = "exprs") 
    })

data(exampleNSEData)
esBy(testExp, 
    GROUP = "cell_line", 
    FUN = function(x) { 
        assayDataApply(x, MARGIN = 1, FUN = mean, elt = "exprs") 
    })


Nanostring-Biostats/NanoStringExperiment documentation built on April 28, 2022, 6:24 a.m.