group_size: Statistics on the size of groups in a partition

View source: R/functions_statistics.R

group_sizeR Documentation

Statistics on the size of groups in a partition

Description

This function computes the average or the standard deviation of the size of groups in a partition.

Usage

group_size(partition, stat)

Arguments

partition

A partition (vector)

stat

The statistic to compute : 'avg' for average and 'sd' for standard deviation

Value

A number corresponding to the correlation coefficient if the attribute is numerical or the correlation ratio if the attribute is categorical.

Examples

p <- c(1,2,2,3,3,4,4,4,5)
group_size(p,'avg')
group_size(p,'sd')

ERPM documentation built on May 29, 2024, 10:05 a.m.