format_freqs {DescrTab2}R Documentation

Formatting function for absolute and relative frequencies

Description

Formatting function for absolute and relative frequencies

Usage

format_freqs(
  numerator,
  denominator = 1,
  absolute_relative_frequency_mode = c("both", "only_absolute", "only_relative"),
  percent_accuracy = NULL,
  percent_suffix = "%"
)

Arguments

numerator

(numeric) numerator for % calculations

denominator

(numeric) denominator for % calculations

absolute_relative_frequency_mode

one of c("both", "only_absolute", "only_relative"). "both" will print "Absolute Freq. (Relative Freq. %)", the other options work accordingly.

percent_accuracy

NULL or numeric. Refer to the accuracy argument in percent.

percent_suffix

usually "%" or "". Refer to the suffix argument in percent.

Value

string of formatted frequencies


[Package DescrTab2 version 2.1.16 Index]