Aggregates data into a 3D interval array based on a specified column.

iaggregate(data, col = 1)

Arguments

data

The data frame to aggregate.

col

The index of the column to aggregate by.

Value

A structured interval object representing the aggregated data.

Examples

iaggregate(iris, col = 5)
#> , , Sepal.Length
#> 
#>            min max
#> setosa     4.3 5.8
#> versicolor 4.9 7.0
#> virginica  4.9 7.9
#> 
#> , , Sepal.Width
#> 
#>            min max
#> setosa     2.3 4.4
#> versicolor 2.0 3.4
#> virginica  2.2 3.8
#> 
#> , , Petal.Length
#> 
#>            min max
#> setosa     1.0 1.9
#> versicolor 3.0 5.1
#> virginica  4.5 6.9
#> 
#> , , Petal.Width
#> 
#>            min max
#> setosa     0.1 0.6
#> versicolor 1.0 1.8
#> virginica  1.4 2.5
#> 
#> Available components:
#> [1] "inter" "class"
iaggregate(rock, col = 4)
#> , , area
#> 
#>       min   max
#> 6.3  4990  7558
#> 17.1 7943  9333
#> 58.6 9867 11878
#> 82.4 8868 10651
#> 100  1468  5267
#> 119  6425  9364
#> 142  7838 12212
#> 580  1651  9718
#> 740  4193  7416
#> 890  4895  7894
#> 950  5318  7894
#> 1300 1016  8793
#> 
#> , , peri
#> 
#>           min     max
#> 6.3  2791.900 3930.66
#> 17.1 3948.540 4345.75
#> 58.6 4479.410 4864.22
#> 82.4 3518.040 4036.54
#> 100   476.322 1644.96
#> 119  3098.650 4480.05
#> 142  3428.740 4697.65
#> 580   597.808 1485.58
#> 740  1379.350 1977.39
#> 890  1239.660 1851.21
#> 950   990.388 1461.06
#> 1300  308.642 2280.49
#> 
#> , , shape
#> 
#>            min      max
#> 6.3  0.0903296 0.183312
#> 17.1 0.1224170 0.189651
#> 58.6 0.1448100 0.262727
#> 82.4 0.1534810 0.231623
#> 100  0.1635860 0.438712
#> 119  0.1481410 0.203654
#> 142  0.1138520 0.291029
#> 580  0.1824530 0.262651
#> 740  0.1330830 0.280887
#> 890  0.2252140 0.341273
#> 950  0.1541920 0.326635
#> 1300 0.2300810 0.464125
#> 
#> Available components:
#> [1] "inter" "class"
iaggregate(cars, col = 1)
#> , , dist
#> 
#>    min max
#> 4    2  10
#> 7    4  22
#> 8   16  16
#> 9   10  10
#> 10  18  34
#> 11  17  28
#> 12  14  28
#> 13  26  46
#> 14  26  80
#> 15  20  54
#> 16  32  40
#> 17  32  50
#> 18  42  84
#> 19  36  68
#> 20  32  64
#> 22  66  66
#> 23  54  54
#> 24  70 120
#> 25  85  85
#> 
#> Available components:
#> [1] "inter" "class"