calculateCorForTwoMatrices {multiOmicsViz} | R Documentation |
The calculateCorForTwoMatrices function uses the spearman correlation to identify the significant correlations between two matrices.
calculateCorForTwoMatrices(matrix1,matrix2,fdr)
matrix1 |
A R matrix, data.frame or SummarizedExperiment object containing the numeric values. |
matrix2 |
A R matrix, data.frame or SummarizedExperiment object containing
the numeric values. |
fdr |
The FDR threshold for identifying significant correlations. |
This function will return a R matrix object containing significant correlations. "1" represents the significant positive correlation, "-1" represents the significant negative correlation and "0" represents no significant correlation.
Jing Wang
matrix1 <- system.file("extdata","sourceOmics.txt",package="multiOmicsViz") matrix1 <- read.table(matrix1,header=TRUE,sep="\t",stringsAsFactors=FALSE, check.names=FALSE) matrix2 <- system.file("extdata","targetOmics.txt",package="multiOmicsViz") matrix2 <- read.table(matrix2,header=TRUE,sep="\t",stringsAsFactors=FALSE, check.names=FALSE) sig <- calculateCorForTwoMatrices(matrix1=matrix1, matrix2=matrix2,fdr=0.01)