plotFactorsPercent: Generate a ggplot2 plot comparing two factors for a common...

Description Usage Arguments Examples

View source: R/factorHelpers.R

Description

Generates a ggplot barplot that compares two names two nameed factors for the specified points. The x axis corresponds to factor B and the y axis factor A.

Usage

1
2
plotFactorsPercent(factorA, factorB, points = NULL,
  factorA.name = "factorA", factorB.name = "factorB")

Arguments

factorA

the factor the distibution of which with respect to factorB will be assessed (y axis)

factorB

the factor to breakdown factorA by

points

the names of the elemets of the factorsA and factorB to include for the purposed of the plot

Examples

1
2
3
4
5
6
fA <- rep(c('A','B','C','D'), each = 4);
fB <- rep(c('W','Y'), each = 8)
n <- paste0('n',1:16)
names(fA) <- n
names(fB) <- n
plotFactorsPercent(fA, fB, points = names(fA)[1:9])

barkasn/nbHelpers documentation built on Oct. 10, 2020, 9:46 p.m.