Convenience functions with modified defaults for ggplot2.

acid_geom_abline(xintercept = NULL, yintercept = NULL)

acid_geom_bar(..., color = NA, stat = "identity")

acid_geom_label(data = NULL, mapping = NULL, ...)

acid_geom_label_average(data, col, fun = c("mean", "median"),
  digits = 0L, ...)

acid_geom_label_repel(data = NULL, mapping = NULL, color = NULL,
  size = 4L, ...)

Arguments

xintercept, yintercept

numeric(1). Value denoting x- or y-axis cutoff. Specify one but not both.

...

Other arguments passed on to layer(). These are often aesthetics, used to set an aesthetic to a fixed value, like colour = "red" or size = 3. They may also be parameters to the paired geom/stat.

color

character(1). Text color (e.g. "orange").

stat

The statistical transformation to use on the data for this layer, as a string.

data

data.frame. Data.

mapping

Set of aesthetic mappings created by aes() or aes_(). If specified and inherit.aes = TRUE (the default), it is combined with the default mapping at the top level of the plot. You must supply mapping if there is no plot mapping.

col

character(1). Column name.

fun

character(1). Function name to use for average calculation. Currently supports "mean" or "median".

digits

integer(1). Number of significant digits to use. Defaults to rounded.

size

integer(1). Font size.

Value

ggproto.

acid_geom_abline

Horizontal or vertical cutoff line.

acid_geom_label

Modified version of ggplot2::geom_label().

acid_geom_label_average

Add average labels to a plot. For example, col can be nGene. Median or mean values are always calculated per sample (sampleName).

acid_geom_label_repel

Repulsive textual annotations. Modified basejump version of ggrepel::geom_label_repel(). If advanced customization of the text labels is required, simply use the ggrepel version instead.

See also

Examples

## acid_geom_abline ==== ## x-axis line geom <- acid_geom_abline(xintercept = 1L) geom
#> mapping: xintercept = ~xintercept #> geom_vline: na.rm = FALSE #> stat_identity: na.rm = FALSE #> position_identity
## y-axis line geom <- acid_geom_abline(yintercept = 1L) geom
#> mapping: yintercept = ~yintercept #> geom_hline: na.rm = FALSE #> stat_identity: na.rm = FALSE #> position_identity
## acid_geom_label ==== geom <- acid_geom_label() geom
#> geom_label: parse = FALSE, label.padding = 0.2, label.r = 0.15, label.size = NA, na.rm = FALSE #> stat_identity: na.rm = FALSE #> position_identity
## acid_geom_label_average ==== geom <- acid_geom_label_average( data = tibble::tibble( sampleName = rep(c("sample1", "sample2"), times = 4L), counts = seq_len(8L) ), col = "counts", fun = "mean" ) geom
#> mapping: label = ~roundedAverage #> geom_label: parse = FALSE, label.padding = 0.2, label.r = 0.15, label.size = NA, na.rm = FALSE #> stat_identity: na.rm = FALSE #> position_identity
## acid_geom_label_repel ==== geom <- acid_geom_label_repel() geom
#> geom_label_repel: parse = FALSE, box.padding = 0.5, label.padding = 0.25, point.padding = 0.75, label.r = 0.15, label.size = 0.25, segment.colour = NULL, segment.size = 0.5, segment.alpha = NULL, min.segment.length = 0.5, arrow = list(angle = 30, length = 0.01, ends = 2, type = 1), na.rm = FALSE, force = 1, max.iter = 2000, nudge_x = 0, nudge_y = 0, xlim = c(NA, NA), ylim = c(NA, NA), direction = both, seed = NA #> stat_identity: na.rm = FALSE #> position_identity