Skip to contents

Describe a dataset

Usage

describe(df, ...)

Arguments

df

<data.frame> desc

...

<dots> tidyselect columns

Value

<tibble> of summary statistics

Examples

describe(fuimus:::provider_data(2000:2020))
#> # A tibble: 3 × 12
#>   variable   type  range histogram   mean     sd   iqr    med    mad     n nuniq
#>   <chr>      <fct> <chr> <chr>      <dbl>  <dbl> <dbl>  <dbl>  <dbl> <int> <int>
#> 1 group      <chr> [1 -… ▇             1  0         0      1  0         42     2
#> 2 year       <int> [200… ▇▅▅▅▅▅▅▅…  2010  6.13e0   10   2010  7.41e0    42    21
#> 3 net_payme… <int> [101… ▂▁▇▂▁▂▂▃… 14968. 2.89e3 5030. 14906. 3.90e3    42    42
#> # ℹ 1 more variable: top_n <chr>

describe(fuimus:::forager_data(200), !dplyr::starts_with("date"))
#> # A tibble: 4 × 12
#>   variable  type  range    histogram   mean     sd   iqr   med   mad     n nuniq
#>   <chr>     <fct> <chr>    <chr>      <dbl>  <dbl> <dbl> <dbl> <dbl> <int> <int>
#> 1 balance   <dbl> [3.59 -… ▅▇▇▃▂▁▁▁… 125.   88.5    103.  111. 77.5    200   200
#> 2 claim_id  <chr> [3 - 3]  ▇           3     0        0     3   0      200   200
#> 3 payer     <chr> [4 - 12] ▇▇▃▇▁▁▁▃    7.13  2.34     2     7   1.48   200     8
#> 4 ins_class <chr> [7 - 9]  ▇▁▁▁▁▁▁▁…   8.08  0.999    2     9   0      200     2
#> # ℹ 1 more variable: top_n <chr>