Description Usage Arguments Details Value Examples
View source: R/featureCorMatrix.R
featureCorMatrix
returns a correlation matrix between all features
1 | featureCorMatrix(dataframe, absoluteValues = FALSE)
|
dataframe |
A data.frame |
absoluteValues |
A flag stating if only positive correlations should be returned |
The function selects automatically the appropriate correlation coefficient regarding the storage type of both variables - If both variable are numerical ones, the Pearson product-moment correlation coefficient will be chosen - If both variables are categorical, Cramer's V will be used - If one variable is a numerical and the other a categorical one, the Intraclass correlation will be calculated
A correlation matrix
1 | featureCorMatrix(dataframe = iris, absoluteValues = TRUE)
|
$correlationMatrix
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
Sepal.Length 1.0000000 0.1175698 0.8717538 0.8179411 0.7865785
Sepal.Width 0.1175698 1.0000000 0.4284401 0.3661259 0.6330741
Petal.Length 0.8717538 0.4284401 1.0000000 0.9628654 0.9702431
Petal.Width 0.8179411 0.3661259 0.9628654 1.0000000 0.9637857
Species 0.7865785 0.6330741 0.9702431 0.9637857 1.0000000
$corrTypeMatrix
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
Sepal.Length "cor" "cor" "cor" "cor" "icc"
Sepal.Width "cor" "cor" "cor" "cor" "icc"
Petal.Length "cor" "cor" "cor" "cor" "icc"
Petal.Width "cor" "cor" "cor" "cor" "icc"
Species "icc" "icc" "icc" "icc" "cramersV"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.