Skip to contents

Content types that build their own tables rather than arranging data_summary still need the category order the rest of the package settled on. .indep_order is the authoritative source, because add_indep_order() has already resolved sort_indep_by and descend_indep into it. It is only present for categorical dependent variables; summarize_int_cat_data() does no sorting, so a numeric dependent variable falls back to the factor's own levels – which is what arrange_table_data() does in the same situation.

Usage

get_indep_level_order(data_summary, data, indep)

Arguments

data_summary

Summarized data, possibly carrying .indep_order

data

Raw dataset, used for the factor-level fallback

indep

Name of the independent variable, or NULL

Value

Character vector of category labels in order, or NULL