Flip the DT table to put Function, Variable, or Group by on top

flip(expl, top = "fun")

Arguments

expl

Return value from explore

top

The variable (type) to display at the top of the table ("fun" for Function, "var" for Variable, and "byvar" for Group by. "fun" is the default

Details

See https://radiant-rstats.github.io/docs/data/explore.html for an example in Radiant

See also

explore to calculate summaries

summary.explore to show summaries

dtab.explore to create the DT table

Examples

explore(diamonds, "price:x", top = "var") %>% summary()
#> Explore
#> Data        : diamonds 
#> Functions   : mean, sd 
#> Top         : Variables 
#> 
#>  .function     price carat clarity   cut color  depth  table     x
#>       mean 3,907.186 0.794   0.013 0.034 0.127 61.753 57.465 5.722
#>         sd 3,956.915 0.474   0.115 0.180 0.333  1.446  2.241 1.124
explore(diamonds, "price", byvar = "cut", fun = c("n_obs", "skew"), top = "byvar") %>% summary()
#> Explore
#> Data        : diamonds 
#> Grouped by  : cut 
#> Functions   : n_obs, skew 
#> Top         : Group by 
#> 
#>  variable function.    Fair    Good Very_Good Premium     Ideal
#>     price     n_obs 101.000 275.000   677.000 771.000 1,176.000
#>     price      skew   1.574   1.489     1.601   1.413     1.799