acid_geom_label_average | R Documentation |
Add average labels to a plot.
acid_geom_label_average(data, col, fun = c("mean", "median"), digits = 0L, ...)
data |
|
col |
|
fun |
|
digits |
|
... |
Additional arguments, passed to |
For example, col
can be nGene
. Median or mean values are always
calculated per sample (sampleName
).
Layer
/ggproto
.
Updated 2021-06-29.
data <- data.frame(
"sampleName" = rep(c("sample1", "sample2"), times = 4L),
"counts" = seq_len(8L)
)
geom <- acid_geom_label_average(
data = data,
col = "counts",
fun = "mean"
)
print(geom)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.