mbecMosaic: Mosaic Sample Group Allocation

Description Usage Arguments Details Value Examples

View source: R/mbecs_analyses.R

Description

Depicts the dispersion of samples over two (preferentially categorical) covariates of interest. Effectively showing, the un-/evenness within and between covariates to inform the choice of methods for the subsequent steps in an analysis.

Usage

1
mbecMosaic(input.obj, model.vars = c("batch", "group"), return.data = FALSE)

Arguments

input.obj

MbecData object

model.vars

Two covariates of interest to the sample allocation.

return.data

Logical if TRUE returns the data.frame required for plotting. Default (FALSE) will return plot object.

Details

The function returns either a plot-frame or the finished ggplot object. Input for the data-set can be an MbecData-object.

Value

either a ggplot2 object or a formatted data-frame to plot from

Examples

1
2
3
4
5
6
7
# This will return the plot-df of the samples grouped by group and batch.
data.Mosaic <- mbecMosaic(input.obj=dummy.mbec,
model.vars=c('group','batch'), return.data=TRUE)

# Return the ggplot2 object of the samples grouped by group and batch
plot.Mosaic <- mbecMosaic(input.obj=dummy.mbec,
model.vars=c('group','batch'), return.data=FALSE)

buschlab/MBECS documentation built on Jan. 21, 2022, 1:27 a.m.