View source: R/functions_statistics.R
group_size | R Documentation |
This function computes the average or the standard deviation of the size of groups in a partition.
group_size(partition, stat)
partition |
A partition (vector) |
stat |
The statistic to compute : 'avg' for average and 'sd' for standard deviation |
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)
group_size(p,'avg')
group_size(p,'sd')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.