chmNewCovariateBar: Create a new covariate Bar for a NGCHM

Description Usage Arguments Value See Also Examples

View source: R/functions.R

Description

This function creates a new covariate bar suitable for adding to a Next Generation Clustered Heat Map.

Usage

1
2
chmNewCovariateBar(covar, display = "visible", thickness = as.integer(10),
  merge)

Arguments

covar

The covariate to be displayed in the bar.

display

Whether the covariate bar will be "hidden" or "visible" (default).

thickness

The thickness of the covariate bar in pixels. (Default 10).

merge

Algorithm for merging covariates when necessary ("average", "peakColor", "specialColor", or "mostCommon").

Value

An object of class ngchmBar

See Also

ngchmBar-class

chmNewColorMap

chmAddCovariateBar

Examples

1
2
3
4
5
6
bar.data <- ifelse (rnorm(1000) < 0, "negative", "non-negative")
names(bar.data) <- sprintf ("Sample%d", 1:length(bar.data))
bar.colors <- chmNewColorMap (c("negative", "non-negative"),
                              c("white", "black"), missing.color='red')
covar <- chmNewCovariate ("Group", bar.data, bar.colors, "discrete")
bar <- chmNewCovariateBar (covar)

bmbroom/NGCHMR documentation built on Aug. 8, 2017, 5:17 p.m.