Usage
cor(x, y = NULL,
use = "all.obs",
method = c("pearson", "kendall", "spearman"),
quick = 0,
cosine = FALSE,
cosineX = cosine,
cosineY = cosine,
nThreads = 0,
verbose = 0, indent = 0)corFast(x, y = NULL,
use = "all.obs",
quick = 0, nThreads = 0,
verbose = 0, indent = 0)
cor1(x, use = "all.obs", verbose = 0, indent = 0)
Arguments
x
a numeric vector or a matrix. If y
is null, x
must be a matrix.
y
a numeric vector or a matrix. If not given, correlations of columns of x
will be
calculated.
use
a character string specifying the handling of missing data. The fast calculations currently
support "all.obs"
and "pairwise.complete.obs"
; for other options, see R's standard
correlation function
method
a character string specifying the method to be used. Fast calculations are currently
available only for "pearson"
.
quick
real number between 0 and 1 that controls the precision of handling of missing data in the
calculation of correlations. See details.
cosine
logical: calculate cosine correlation? Only valid for method="pearson"
.
Cosine correlation is similar to Pearson correlation but the mean subtraction is not performed. The result
is the cosine of the angle(s) between (the columns of) x<
cosineX
logical: use the cosine calculation for x
? This setting does not affect y
and can be used to give a hybrid cosine-standard correlation.
cosineY
logical: use the cosine calculation for y
? This setting does not affect x
and can be used to give a hybrid cosine-standard correlation.
nThreads
non-negative integer specifying the number of parallel threads to be used by certain
parts of correlation calculations. This option only has an effect on systems on which a POSIX thread
library is available (which currently includes Linux and Mac OSX, but
verbose
Controls the level of verbosity. Values above zero will cause a small amount of
diagnostic messages to be printed.
indent
Indentation of printed diagnostic messages. Each unit above zero adds two spaces.