View source: R/functions_statistics.R
correlation_with_size | R Documentation |
This function computes the correlation between an attribute and the size of the groups.
correlation_with_size(partition, attribute, categorical)
partition |
A partition (vector) |
attribute |
A vector containing the values of the attribute |
categorical |
A Boolean (True or False) indicating if the attribute is categorical |
A number corresponding to the correlation coefficient if the attribute is numerical or the correlation ratio if the attribute is categorical.
p <- c(1,2,2,3,3,4,4,4,5)
at <- c(3,5,23,2,1,0,3,9,2)
correlation_with_size(p,at,categorical=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.