You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the commit f2ad13509ba3d6ab28069840c9631a66a9e7ecc8, the function findCorrelation_exact on row 38 computes the incorrect mean absolute correlation for mn2. The function calculates the mean of the matrix without the variable j, instead of calculating the mean of variable j against the other variables. There are two possible solutions:
1 - Remove the minus sign from j, thereby comparing two different rows of the matrix. However, when verbose = TRUE, the output prints: "Compare row i and column j with corr...". Despite the mirroring of the row and column (being the same), this text is incorrect.
2 - Remove the minus sign and change j to the column position.
#before the commit
(mean(x[i, -i]) > mean(x[-j, j]) #compare the mean of two vectors#after the commitmn1<- mean(x2[i,], na.rm=TRUE) #return the mean of a vectormn2<- mean(x2[-j,], na.rm=TRUE) #return the mean of a matrix#possible solution 1mn2<- mean(x2[j,], na.rm=TRUE) #return the mean of the row #possible solution2mn2<- mean(x2[, j], na.rm=TRUE) #return the mean of the column
Since the commit
f2ad13509ba3d6ab28069840c9631a66a9e7ecc8
, the functionfindCorrelation_exact
on row 38 computes the incorrect mean absolute correlation formn2
. The function calculates the mean of the matrix without the variablej
, instead of calculating the mean of variablej
against the other variables. There are two possible solutions:1 - Remove the minus sign from
j
, thereby comparing two different rows of the matrix. However, whenverbose = TRUE
, the output prints: "Compare row i and column j with corr...". Despite the mirroring of the row and column (being the same), this text is incorrect.2 - Remove the minus sign and change
j
to the column position.Minimal dataset:
Minimal, reproducible example:
Created on 2024-10-23 with reprex v2.1.1
Session Info:
The text was updated successfully, but these errors were encountered: