Summarize attributes and levels in tidy choice data containing categorical attributes (before dummy-coding)

ec_summarize_attrlvls(data_in)

ec_summarise_attrlvls(data_in)

Arguments

data_in

A tibble, containing long-format choice data

Value

A tibble with one row per attribute, and a list of the levels

Details

This functions looks for categorical attributes and summaries their levels This is helpful when evaluating a new choice data file.

Examples

data(icecream)
ec_summarize_attrlvls(icecream)
#> # A tibble: 3 × 2
#>   attribute levels                                                              
#>   <chr>     <chr>                                                               
#> 1 Brand     BenNJerry, BlueBell, BlueBunny, Breyers, Dryers, HaagenDa, Store    
#> 2 Flavor    Chocolate, ChocChip, ChocDough, CookieCream, Neapolitan, Oreo, Rock…
#> 3 Size      4, 8, 16