| percentage_of_map_seq | R Documentation |
percentage_of_map_seq() varies the reported counts,
percentages, and totals a few steps up and down and applies
percentage_of() to each resulting value set. This shows whether a
small error in one of them could explain an inconsistency.
Call audit() on the output for summary statistics.
percentage_of_map_seq(
data,
digits_percentage,
absolute = NULL,
percentage = NULL,
n = NULL,
...,
rounding = "up_or_down",
threshold = 5,
symmetric = FALSE,
var = c("absolute", "percentage", "n"),
dispersion = 1:5,
out_min = "auto",
out_max = "auto",
include_reported = FALSE,
include_consistent = FALSE
)
data |
A data frame that |
digits_percentage |
Integer. The number of decimal places in
|
absolute, percentage, n |
Optionally, the names of the columns in |
... |
These dots must be empty. Every argument after them must be named in full. |
rounding, threshold, symmetric |
The same as in |
var |
String. The variables to disperse. Default is
|
dispersion |
Numeric. Steps up and down from the reported values, in
units of the last decimal place. Default is |
out_min, out_max |
Limits on the dispersed values. Both default to
|
include_reported |
Logical. Should the reported values themselves be
part of the sequences? Default is |
include_consistent |
Logical. Should consistent value sets be dispersed
as well, not just inconsistent ones? Default is |
A tibble with the columns of percentage_of_map() output plus
diff_var, case, and var, as in grim_map_seq(). As there, the
other columns of data are dropped.
df <- tibble::tibble(
absolute = c(40, 37, 25),
percentage = c(33, 31, 20),
n = 120
)
df |>
percentage_of_map_seq(digits_percentage = 0) |>
audit()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.