grouping_function

grouping_function(parameter_value = NULL, subgroup_size = NULL)

Arguments

parameter_value

is a column of Data Frame

subgroup_size

is group size of vector

Value

grouped data frame

Examples

grouping_function(parameter_value = cars$speed, subgroup_size = 2)
#> X1 X2 groups Range Mean #> 1 4 4 1 3 4.0 #> 2 7 7 2 5 7.0 #> 3 8 9 3 6 8.5 #> 4 10 10 4 6 10.0 #> 5 10 11 5 6 10.5 #> 6 11 12 6 6 11.5 #> 7 12 12 7 5 12.0 #> 8 12 13 8 5 12.5 #> 9 13 13 9 4 13.0 #> 10 13 14 10 4 13.5 #> 11 14 14 11 3 14.0 #> 12 14 15 12 3 14.5 #> 13 15 15 13 2 15.0 #> 14 16 16 14 2 16.0 #> 15 17 17 15 2 17.0 #> 16 17 18 16 2 17.5 #> 17 18 18 17 1 18.0 #> 18 18 19 18 1 18.5 #> 19 19 19 19 0 19.0 #> 20 20 20 20 0 20.0 #> 21 20 20 21 1 20.0 #> 22 20 22 22 2 21.0 #> 23 23 24 23 1 23.5 #> 24 24 24 24 0 24.0 #> 25 24 25 25 1 24.5