Skip to contents

Plots the prevalence of a given number of features

Usage

plotPrevalence(
  features,
  X,
  y,
  topdown = TRUE,
  main = "",
  plot = TRUE,
  col.pt = c("deepskyblue4", "firebrick4"),
  col.bg = c("deepskyblue1", "firebrick1"),
  zero.value = 0
)

Arguments

features:

a list of features or features indexes for which we wish to compute prevalence

X:

dataset where to compute the prevalence

y:

if provided it will also compute hte prevalence per each class (default:NULL)

topdown:

showing features from top-down or the other way around (default:TRUE)

main:

main title (default:none)

plot:

if TRUE this provides a plot, otherwise will return different metrics such as prevalence and enrichment statistics

col.pt:

colors for the point border (-1:deepskyblue4, 1:firebrick4)

col.bg:

colors for the point fill (-1:deepskyblue1, 1:firebrick1)

zero.value:

the value that specifies what is zero. This can be a different than 0 in log transformed data for instance (default = 0)

Value

a ggplot object