colorsByFactor: Create colors for the plots and the legends

View source: R/functions_processingQC.R

colorsByFactorR Documentation

Create colors for the plots and the legends

Description

This function (from functions_processing) creates a list with two elements: a vector of colors, one for each array and a vector of one representative color for each group within the experiment, for use in legends. The colors are based on groups present in the dataset (as provided by the user in experimentFactor). If there is only one group, colors are chosen randomly over the rainbow palette. Otherwise arrays belonging to the same group get different shades of a similar color.

Usage

colorsByFactor(experimentFactor)

Arguments

experimentFactor

(Status: required) The factor of groups (datatype: factor)

Value

A list with two fields: plotColors contains a vector of colors, one for each array; legendColors contains a representative color for each group, for use in legends (datatype: list)

Examples

#By default, the script will call:
#colList <- colorsByFactor(experimentFactor)
#plotColors <- colList$plotColors
#legendColors <- colList$legendColors
#rm(colList)

ammar257ammar/ArrayAnalysis-Bioconductor documentation built on Jan. 29, 2024, 7:21 a.m.