Skip to contents

Data summary for printing visual summary

Usage

data_summary_gather(
  data,
  summary.fun = class,
  palette.fun = viridisLite::viridis
)

Arguments

data

data.frame

palette.fun

optionally use specific palette functions. First argument has to be the length.

fun

summary function. Default is "class"

Value

data.frame

Examples

mtcars |> data_summary_gather()
#> $data
#> # A tibble: 352 × 4
#>     rows variable valueType valueType_num
#>    <int> <chr>    <chr>             <dbl>
#>  1     1 am       numeric               1
#>  2     1 carb     numeric               1
#>  3     1 cyl      numeric               1
#>  4     1 disp     numeric               1
#>  5     1 drat     numeric               1
#>  6     1 gear     numeric               1
#>  7     1 hp       numeric               1
#>  8     1 mpg      numeric               1
#>  9     1 qsec     numeric               1
#> 10     1 vs       numeric               1
#> # ℹ 342 more rows
#> 
#> $colors
#>     numeric 
#> "#440154FF" 
#> 
#> $labels
#> $labels[[1]]
#> $labels[[1]]$from
#> [1] 1
#> 
#> $labels[[1]]$to
#> [1] 1
#> 
#> $labels[[1]]$color
#> [1] "#440154FF"
#> 
#> $labels[[1]]$name
#> [1] "numeric"
#> 
#> 
#>