Description Usage Arguments Details Value Note Author(s) See Also Examples
Functions to calculate Pearson / Spearman correlation coefficient.
1 2 3 |
x, y |
A vector of expression values |
data |
An expression matrix with genes in the rows, samples in the columns. |
rankBased |
When |
sorting |
Whether sort the output vector of correlation coefficients. |
getCorr
evaluate the correlation coefficient between two vectors. It gives the same result as the generic
function cor.getAllMIWz evaluates the correlation coefficients between every row in
data and the given vector x. The output vector of correlation coefficients will be
sorted if sorting is TRUE.
Spearman's rank correlation coefficients are calculated if rankBased is set to TRUE.
getCorr returns the correlation coefficient between two vectors.
getAllMIWz returns a vector of correlation coefficients between each row of data
and the vector x.
Missing values are not allowed as the input to the function in the current version.
Wei-Yi Cheng
cor for the generic functions to calculate correlation coefficients.
findCorrAttractor for finding the correlation coefficient based attractors.
getMI, getAllMIWz
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Load the toy dataset extracted from TCGA OV data
data(ov)
#==============
# First example: find the Pearson correlation coefficients between CENPA and MELK
#==============
x <- ov["CENPA",]
y <- ov["MELK",]
mi <- getCorr(x, y)
#==============
# Second example: evaluate the Spearman correlation coefficients between
# every gene in the dataset and CENPA
#==============
mis <- getAllCorWz(ov, x, rankBased=TRUE, sorting=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.