Compare feature expression correlation across two data sets.

plotCountsCorrelation(x, y, ...)

# S4 method for matrix,matrix
plotCountsCorrelation(
x,
y,
i = NULL,
j = NULL,
color = getOption(x = "acid.color.discrete", default =
acidplots::scale_color_synesthesia_d()),
labels = list(title = NULL, subtitle = NULL, color = NULL, x = NULL, y = "counts"),
.xname = getNameInParent(x),
.yname = getNameInParent(y)
)

## Arguments

x Object. Object. indices specifying elements to extract or replace. Indices are numeric or character vectors or empty (missing) or NULL. Numeric values are coerced to integer as by as.integer (and hence truncated towards zero). Character vectors will be matched to the names of the object (or for matrices/arrays, the dimnames): see ‘Character indices’ below for further details. For [-indexing only: i, j, ... can be logical vectors, indicating elements/slices to select. Such vectors are recycled if necessary to match the corresponding extent. i, j, ... can also be negative integers, indicating elements/slices to leave out of the selection. When indexing arrays by [ a single argument i can be a matrix with as many columns as there are dimensions of x; the result is then a vector with elements corresponding to the sets of indices in each row of i. An index value of NULL is treated as if it were integer(0). indices specifying elements to extract or replace. Indices are numeric or character vectors or empty (missing) or NULL. Numeric values are coerced to integer as by as.integer (and hence truncated towards zero). Character vectors will be matched to the names of the object (or for matrices/arrays, the dimnames): see ‘Character indices’ below for further details. For [-indexing only: i, j, ... can be logical vectors, indicating elements/slices to select. Such vectors are recycled if necessary to match the corresponding extent. i, j, ... can also be negative integers, indicating elements/slices to leave out of the selection. When indexing arrays by [ a single argument i can be a matrix with as many columns as there are dimensions of x; the result is then a vector with elements corresponding to the sets of indices in each row of i. An index value of NULL is treated as if it were integer(0). ScaleDiscrete. Desired ggplot2 color scale. Must supply discrete values. When set NULL, the default ggplot2 color palette will be used. If manual color definitions are desired, we recommend using ggplot2::scale_color_manual(). To set the discrete color palette globally, use:options(acid.color.discrete = ggplot2::scale_color_viridis_d()) list. ggplot2 labels. See ggplot2::labs() for details. Name of object defined in x. Not intended to be used directly. Name of object defined in y. Not intended to be used directly. Additional arguments.

## Value

Graphical output.

## Note

Updated 2019-09-16.

## Examples

data(RangedSummarizedExperiment, package = "acidtest")

## matrix ====
x <- SummarizedExperiment::assay(RangedSummarizedExperiment)
x <- x[seq_len(4L), seq_len(2L)]
y <- x * 2L
plotCountsCorrelation(x, y)