cor.test: Correlate wells

Description Usage Arguments Details Value See Also Examples

Description

This calculates all-against-all correlations between selected parameters inferred from the contained wells or correlations between all wells and selected wells of interest.

Usage

1
2
3
4
5
  ## S4 method for signature 'MOPMX'
cor.test(x, ...) 
  ## S4 method for signature 'OPMS'
cor.test(x, y = NULL, method = "pearson",
    use = "everything", subset = opm_opt("curve.param"), ...) 

Arguments

x

OPMS or MOPMX object. It is an error if the x contains non-aggregated plates and if MOPMX object contains OPM objects.

y

Optional vector with names or indexes of columns to correlate with the full extracted matrix. Note that the names must refer to this generated matrix, not to the well names in x.

method

Character scalar passed to cor from the stats package.

use

Character scalar also passed to cor.

subset

Character scalar passed to extract.

...

Optional arguments passed to extract.

Details

The resulting matrix can be plotted, e.g., using the corrplot function from the corrplot package.

Value

For the OPMS method, a squared matrix of correlations if y is empty, another matrix with correlations otherwise. The MOPMX method returns a list of such matrices.

See Also

stats::cor stats::cor.test corrplot::corrplot

Other res: opm_dbclear, opm_dbfind, opm_dbget, opm_dbnext, opm_dbput

Examples

1
2
3
4
5
6
7
8
9
(x <- cor.test(vaas_4[, , 1:20]))
stopifnot(is.matrix(x), dim(x) == 20)
# adapt default text size to a full 96-well plate
my_corrplot <- function(corr, tl.col = "grey30", tl.cex = 0.4,
    mar = c(2, 2, 2, 2), ...) {
  corrplot::corrplot(corr = corr, tl.col = tl.col,
    tl.cex = tl.cex, mar = mar, ...)
}
my_corrplot(x)

opmextra documentation built on May 2, 2019, 5:49 p.m.

Related to cor.test in opmextra...