Invisibly returns a data frame with rank-frequency information.
Arguments
df
A data frame containing the nominal variable.
var
Character string specifying the nominal variable column.
max_rank
Maximum number of ranks to display. If NULL (default),
all ranks are shown.
top_prop
Proportion of total observations to retain (0–1). If set,
only the most frequent categories accounting for this cumulative proportion
are displayed. Overrides max_rank.
loglog
Logical. If TRUE, both axes are displayed on a log10 scale.