karoliskoncevicius / matrixTests

R package for computing multiple hypothesis tests on rows/columns of a matrix or a data.frame
https://cran.r-project.org/web/packages/matrixTests/index.html
36 stars 5 forks source link

Add Spearman's correlation #21

Open ysbioinfo opened 4 years ago

ysbioinfo commented 4 years ago

Hi, First thanks a lot for developing such an awesome package! It gives me a lot of help! I noticed that only pearson correlation is allowed now, is it possible for you to add spearman correlation in cor_test?

Thanks!

Yang

karoliskoncevicius commented 4 years ago

Hello,

Glad to hear you like the package. When I developed it I was surprised I was the first to see the need for a general package with tests like that... So always good to see other people appreciate it too.

About Spearman correlation - it is possible to add it, but it takes a lot more time compared with Pearson's correlation. Plus it might not be as fast in the end, since it uses ranks which are harder to vectorise. Adding Spearman's correlation is on my mind, but cannot promise it will be added quickly. Will have a look this week and try to estimate how much time it would take.

ysbioinfo commented 4 years ago

Thanks for the clarification about the difference between spearman and pearson. I don't know much about the underlying mechanism of vectorization but may you succeed and make matrixTests more powerful! Thanks again.

Yang