Skip to contents

Pearson correlation matrix between columns of X, Y modification the code from: http://stackoverflow.com/questions/5888287/running-cor-or-any-variant- over-a-sparse-matrix-in-r https://github.com/cysouw/qlcMatrix/blob/master/R/assoc.R

Usage

corSparse(X, Y)

Arguments

X

matrix

Y

matrix or vector

Value

correlation cofficient

Note

Note that results larger than 1e4 x 1e4 will become very slow, because the resulting matrix is not sparse anymore.