meanBy: Mean within subset

Description Usage Arguments Value Author(s) Examples

View source: R/by.meanBy.R

Description

Calculate an average of a target within the subset of samples divided by the specified column in @sinfo

Usage

1
meanBy(baf, by, geometric = FALSE)

Arguments

baf

an object of the BAf-class

by

the column in @sinfo by which samples will be stratified

geometric

if the geometic mean should be calculated

Value

A "matrix" of which the columns are levels in the columns of 'by' and the rows are targets

Author(s)

Mun-Gwan Hong <mun-gwan.hong@scilifelab.se>

Examples

1
2
3
data(sba)
meanBy(sba, "plate")		# average by "plate"
meanBy(sba, "dis", geometric = TRUE)		# geometric mean by "dis"

Rundmus/BAf-R_package documentation built on May 18, 2020, 12:59 p.m.