[R] How does findAssocs() calculate the correlation value ??

θ ” yarmi1224 at hotmail.com
Fri Jul 7 03:55:39 CEST 2017


I want to know the math behind the "tm" package findAssocs().

I have found that someone had asked the question before, and have a good explanation by Rick.


But I still don't understand how to calculate the correlation value between the two vectors.

For example:

# Correlation word2 with word3

   [1] 0.6123724

How does it caculate  cor(c(0,1,1,1,1),c(0,0,1,1,1)) to get 0.6123724 ?


	[[alternative HTML version deleted]]

More information about the R-help mailing list