Generate similar statistics as what is generated by distributional statistics calculator from dynamic asset webpage's distributional codes: https://fanwangecon.github.io/CodeDynaAsset/
ff_summ_percentiles(df = iris, bl_statsasrows = TRUE, col2varname = FALSE)
dataframe input dataframe of interest
boolean if true then rotate table
boolean if true drop var names
a dataframe with summary statistics.
https://fanwangecon.github.io/REconTools/reference/ff_summ_percentiles.html https://github.com/FanWangEcon/REconTools/blob/master/R/ff_summ_percentiles.R
ff_summ_percentiles(iris)
#> Warning: `as.tibble()` was deprecated in tibble 2.0.0.
#> Please use `as_tibble()` instead.
#> The signature and semantics have changed, see `?as_tibble`.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.
#> Warning: attributes are not identical across measure variables;
#> they will be dropped
#> # A tibble: 18 x 5
#> stats Petal.Length Petal.Width Sepal.Length Sepal.Width
#> <chr> <chr> <chr> <chr> <chr>
#> 1 n 150 150 150 150
#> 2 unique 43 22 35 23
#> 3 NAobs 0 0 0 0
#> 4 ZEROobs 0 0 0 0
#> 5 mean 3.758000 1.199333 5.843333 3.057333
#> 6 sd 1.7652982 0.7622377 0.8280661 0.4358663
#> 7 cv 0.4697441 0.6355511 0.1417113 0.1425642
#> 8 min 1.0 0.1 4.3 2.0
#> 9 p01 1.149 0.100 4.400 2.200
#> 10 p05 1.300 0.200 4.600 2.345
#> 11 p10 1.4 0.2 4.8 2.5
#> 12 p25 1.6 0.3 5.1 2.8
#> 13 p50 4.35 1.30 5.80 3.00
#> 14 p75 5.1 1.8 6.4 3.3
#> 15 p90 5.80 2.20 6.90 3.61
#> 16 p95 6.100 2.300 7.255 3.800
#> 17 p99 6.700 2.500 7.700 4.151
#> 18 max 6.9 2.5 7.9 4.4
ff_summ_percentiles(iris, FALSE)
#> Warning: attributes are not identical across measure variables;
#> they will be dropped
#> # A tibble: 4 x 19
#> var n unique NAobs ZEROobs mean sd cv min p01 p05 p10
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 Petal.Le~ 150 43 0 0 3.76 1.77 0.470 1 1.15 1.3 1.4
#> 2 Petal.Wi~ 150 22 0 0 1.20 0.762 0.636 0.1 0.1 0.2 0.2
#> 3 Sepal.Le~ 150 35 0 0 5.84 0.828 0.142 4.3 4.4 4.6 4.8
#> 4 Sepal.Wi~ 150 23 0 0 3.06 0.436 0.143 2 2.2 2.34 2.5
#> # ... with 7 more variables: p25 <dbl>, p50 <dbl>, p75 <dbl>, p90 <dbl>,
#> # p95 <dbl>, p99 <dbl>, max <dbl>