View source: R/functions_statistics.R
range_attribute | R Documentation |
This function computes the sum or the average range of an attribute for groups in a partition.
range_attribute(partition, attribute, stat)
partition |
A partition (vector) |
attribute |
A vector containing the values of the attribute |
stat |
The statistic to compute : 'avg_pergroup' for the average per group and 'sum_pergroup' for the sum of the ranges |
The statisic chosen in stat
p <- c(1,2,2,3,3,4,4,4,5)
at <- c(3,5,23,2,1,0,3,9,2)
range_attribute(p,at,'avg_pergroup')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.