Table with frequency statistics

nice_frequencies(
  data,
  grouping = NULL,
  label = NULL,
  label_grouping = NULL,
  show_missing = TRUE,
  show_percent = TRUE,
  auto_labels = TRUE,
  title = NULL,
  footnote = NULL,
  file = NULL,
  ...
)

Arguments

data

Vector.

grouping

A grouping variable as a vector.

label

Set label for the variable name.

show_missing

If TRUE, adds a row for the number of missing values.

show_percent

If TRUE, adds a column for percentages.

auto_labels

If TRUE, variable names are taken from a label attribute.

title

Table title.

footnote

Table footnote.

file

Filename.

...

Further arguments passed to nice_table().

Value

An html table with frequencies

Examples

nice_frequencies(wmisc:::mtcars_labeled[[11]])
Table
Frequency statistics of ‘Number of carburetors’
Number of carburetors Frequency Percent
1 7 22
2 10 31
3 3 9
4 10 31
6 1 3
8 1 3
Missing 0 0
nice_frequencies( wmisc:::mtcars_labeled$cyl, wmisc:::mtcars_labeled$am )
Table
Frequency statistics of ‘Number of cylinders’ by ‘Transmission (0 = automatic, 1 = manual)’
Number of cylinders
Transmission (0 = automatic, 1 = manual) (n)
Transmission (0 = automatic, 1 = manual) (%)
0 1 0 1
4 3 8 16 62
6 4 3 21 23
8 12 2 63 15
Missing 0 0 0 0