chmColors: Get the colors of an ngchmColormap, ngchmLayer, ngchmBar, or...

View source: R/functions.R

chmColorsR Documentation

Get the colors of an ngchmColormap, ngchmLayer, ngchmBar, or ngchmCovariate.

Description

Get the colors of an ngchmColormap, ngchmLayer, ngchmBar, or ngchmCovariate.

Usage

chmColors(x)

Arguments

x

The object to get the colors of.

Value

A character string vector of the map colors.

See Also

ngchm

Examples

# If the NGCHMDemoData package is installed, use it to demo usage
if (requireNamespace("NGCHMDemoData", quietly = TRUE)) {
  data(TCGA.GBM.EXPR, package = "NGCHMDemoData")
  colors <- chmColors(chmNewDataLayer("GBM Expression", TCGA.GBM.EXPR[1:50, 1:50]))
}
# Small example not requiring NGCHMDemoData
matrix <- matrix(rnorm(100),
  nrow = 10, ncol = 10,
  dimnames = list(paste0("r", 1:10), paste0("c", 1:10))
)
colors <- chmColors(chmNewDataLayer("my layer", matrix))


MD-Anderson-Bioinformatics/NGCHM-R documentation built on April 1, 2024, 12:34 p.m.