plotBy2Groups: Separate and plot data by 2 groups

View source: R/plotBy2Groups.R

plotBy2GroupsR Documentation

Separate and plot data by 2 groups

Description

Plot series of data as membership of 2 different grouping vectors (eg by grp=patient and grp2=age-group).

Usage

plotBy2Groups(
  dat,
  grp,
  grp2 = NULL,
  col = NULL,
  pch = NULL,
  tit = NULL,
  cex = 2,
  lwd = 0.5,
  lty = 2,
  yLab = NULL,
  cexLab = NULL,
  sepLines = FALSE,
  silent = FALSE,
  debug = FALSE,
  callFrom = NULL
)

Arguments

dat

(numeric) main data (may contain NA)

grp

(character or factor) grouping of columns of 'dat', eg replicate association

grp2

(character or factor) aadditional/secondary grouping of columns of 'dat'

col

(character or integer) use custom colors, see also par

pch

(integer) symbol to mark group-center (see also par)

tit

(character) custom title

cex

(numeric) expansion factor for text (see also par)

lwd

(integer) line-width (see also par)

lty

(integer) line-type (see also par)

yLab

(character) custom y-axis label

cexLab

(numeric) expansion factor for labels: 1st value for main groups (grp, eg genotypes), 2nd for detailed text (grp2, eg animal IDs) (see also par)

sepLines

(logical) optional drawing of horizontal lines aiming to separate groups (in analogy to support vectors)

silent

(logical) suppress messages

debug

(logical) additional messages for debugging

callFrom

(character) allow easier tracking of messages produced

Value

list with $annot, $abund for initial/raw abundance values and $quant with final normalized quantitations, or returns data.frame with annot and quant if separateAnnot=FALSE

See Also

read.table, normalizeThis)

Examples

set.seed(2020); rand1 <- round(runif(12),2) +rep(1:3,each=4)
plotBy2Groups(rand1, gl(2,6,labels=LETTERS[5:6]), gl(4,3,labels=letters[1:4]))
 

wrGraph documentation built on Oct. 20, 2023, 5:08 p.m.