Skip to contents

Generate summary statistics for all continuous variables in data.

Usage

ds_auto_group_summary(data, ...)

Arguments

data

A data.frame or tibble.

...

Column(s) in data.

Examples

# summary statistics of mpg & disp for each level of cyl & gear
ds_auto_group_summary(mtcarz, cyl, gear, mpg, disp)
#>                                            by                                             
#> -----------------------------------------------------------------------------------------
#> |     Statistic/Levels|                    4|                    6|                    8|
#> -----------------------------------------------------------------------------------------
#> |                  Obs|                   11|                    7|                   14|
#> |              Minimum|                 21.4|                 17.8|                 10.4|
#> |              Maximum|                 33.9|                 21.4|                 19.2|
#> |                 Mean|                26.66|                19.74|                 15.1|
#> |               Median|                   26|                 19.7|                 15.2|
#> |                 Mode|                 22.8|                   21|                 10.4|
#> |       Std. Deviation|                 4.51|                 1.45|                 2.56|
#> |             Variance|                20.34|                 2.11|                 6.55|
#> |             Skewness|                 0.35|                -0.26|                -0.46|
#> |             Kurtosis|                -1.43|                -1.83|                 0.33|
#> |       Uncorrected SS|              8023.83|              2741.14|              3277.34|
#> |         Corrected SS|               203.39|                12.68|                 85.2|
#> |      Coeff Variation|                16.91|                 7.36|                16.95|
#> |      Std. Error Mean|                 1.36|                 0.55|                 0.68|
#> |                Range|                 12.5|                  3.6|                  8.8|
#> |  Interquartile Range|                  7.6|                 2.35|                 1.85|
#> -----------------------------------------------------------------------------------------
#> 
#> 
#> 
#>                                            by                                             
#> -----------------------------------------------------------------------------------------
#> |     Statistic/Levels|                    3|                    4|                    5|
#> -----------------------------------------------------------------------------------------
#> |                  Obs|                   15|                   12|                    5|
#> |              Minimum|                 10.4|                 17.8|                   15|
#> |              Maximum|                 21.5|                 33.9|                 30.4|
#> |                 Mean|                16.11|                24.53|                21.38|
#> |               Median|                 15.5|                 22.8|                 19.7|
#> |                 Mode|                 10.4|                   21|                   15|
#> |       Std. Deviation|                 3.37|                 5.28|                 6.66|
#> |             Variance|                11.37|                27.84|                44.34|
#> |             Skewness|                -0.09|                  0.7|                 0.56|
#> |             Kurtosis|                -0.38|                -0.77|                -1.83|
#> |       Uncorrected SS|              4050.52|               7528.9|              2462.89|
#> |         Corrected SS|               159.15|               306.29|               177.37|
#> |      Coeff Variation|                20.93|                21.51|                31.15|
#> |      Std. Error Mean|                 0.87|                 1.52|                 2.98|
#> |                Range|                 11.1|                 16.1|                 15.4|
#> |  Interquartile Range|                  3.9|                 7.08|                 10.2|
#> -----------------------------------------------------------------------------------------
#> 
#> 
#> 
#>                                            by                                             
#> -----------------------------------------------------------------------------------------
#> |     Statistic/Levels|                    4|                    6|                    8|
#> -----------------------------------------------------------------------------------------
#> |                  Obs|                   11|                    7|                   14|
#> |              Minimum|                 71.1|                  145|                275.8|
#> |              Maximum|                146.7|                  258|                  472|
#> |                 Mean|               105.14|               183.31|                353.1|
#> |               Median|                  108|                167.6|                350.5|
#> |                 Mode|                 71.1|                  160|                275.8|
#> |       Std. Deviation|                26.87|                41.56|                67.77|
#> |             Variance|               722.08|              1727.44|              4592.95|
#> |             Skewness|                 0.16|                  1.3|                 0.57|
#> |             Kurtosis|                -1.41|                 0.39|                -0.86|
#> |       Uncorrected SS|               128811|             245593.5|              1805223|
#> |         Corrected SS|              7220.83|             10364.63|             59708.38|
#> |      Coeff Variation|                25.56|                22.67|                19.19|
#> |      Std. Error Mean|                  8.1|                15.71|                18.11|
#> |                Range|                 75.6|                  113|                196.2|
#> |  Interquartile Range|                 41.8|                 36.3|                88.25|
#> -----------------------------------------------------------------------------------------
#> 
#> 
#> 
#>                                            by                                             
#> -----------------------------------------------------------------------------------------
#> |     Statistic/Levels|                    3|                    4|                    5|
#> -----------------------------------------------------------------------------------------
#> |                  Obs|                   15|                   12|                    5|
#> |              Minimum|                120.1|                 71.1|                 95.1|
#> |              Maximum|                  472|                167.6|                  351|
#> |                 Mean|                326.3|               123.02|               202.48|
#> |               Median|                  318|                130.9|                  145|
#> |                 Mode|                275.8|                  160|                 95.1|
#> |       Std. Deviation|                94.85|                38.91|               115.49|
#> |             Variance|              8997.04|              1513.93|             13338.09|
#> |             Skewness|                 -0.3|                -0.23|                 0.61|
#> |             Kurtosis|                  0.2|                -1.83|                -2.59|
#> |       Uncorrected SS|              1723034|             198250.4|             258343.1|
#> |         Corrected SS|             125958.6|             16653.24|             53352.35|
#> |      Coeff Variation|                29.07|                31.63|                57.04|
#> |      Std. Error Mean|                24.49|                11.23|                51.65|
#> |                Range|                351.9|                 96.5|                255.9|
#> |  Interquartile Range|                104.2|                81.08|                180.7|
#> -----------------------------------------------------------------------------------------
#> 
#> 
#>