diff --git a/NEWS.md b/NEWS.md index 8b8bcd7..430262c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ # scrutiny (development version) -Major performance improvements. Furthermore: +This version brings major performance improvements. Furthermore: ## Bugfixes @@ -8,8 +8,9 @@ Major performance improvements. Furthermore: - Similarly, `audit_seq()` and `reverse_map_seq()` used to reconstruct the reported values incorrectly if the `dispersion` default was overridden as described above. At least for now, the issue is handled by throwing an error if these functions operate on data frames that are the result of specifying `dispersion` as something other than a linearly increasing sequence. - Fixed a bug that incorrectly threw an error in `grim_map_seq()`, other functions made by `function_map_seq()`, as well as `seq_disperse()` and `seq_disperse_df()` if an input value was so close to `out_min` or `out_max` that the output sequence would be shorter than implied by `dispersion` / `.dispersion` , and if `track_var_change` / `.track_var_change` (see below) was `TRUE`. Again, note that the bug only occurred if an error was thrown. -## Minor improvements +## New features +- A new vignette lists the options for specifying the `rounding` argument that many scrutiny functions have: `vignette("rounding-options")`. - The output of `grim_map_seq()`, `grimmer_map_seq()`, `debit_map_seq()` and any other function made by `function_map_seq()` now has a `diff_var` column that tracks the difference between the dispersed variable (see the `var` column) and the reported value. Following the `diff_*` columns in the output of `audit_seq()`, this is the number of dispersion steps, not the actual numeric difference. - The same `diff_*` columns are now integer, not double. - `function_map()`, `function_map_seq()`, and `function_map_total_n()` have a new `.name_key_result` argument that controls the name of the key result column in the output of the factory-made function. This is `"consistency"` by default, but other names will fit better for other kinds of tests. (The results of these tests must still be logical values.) diff --git a/R/grim-plot.R b/R/grim-plot.R index cf4aa45..de84791 100644 --- a/R/grim-plot.R +++ b/R/grim-plot.R @@ -44,9 +44,8 @@ #' #' With `grim_map()`'s default for `rounding`, `"up_or_down"`, strikingly few #' values are flagged as inconsistent for sample sizes 40 and 80 (or 4 and 8). -#' This effect disappears if `rounding` is set to any other value. For a list -#' of values that `rounding` can take, see documentation for `grim()`, section -#' `Rounding`. +#' This effect disappears if `rounding` is set to any other value (see +#' `vignette("rounding-options")`). #' #' The 4/8 leniency effect arises because accepting values rounded either up #' or down is more careful and conservative than any other rounding procedure. diff --git a/R/reround.R b/R/reround.R index 2ad463c..e4311ee 100644 --- a/R/reround.R +++ b/R/reround.R @@ -47,7 +47,7 @@ reconstruct_rounded_numbers_scalar <- function(x, digits, rounding, cli::cli_abort(c( "`rounding` must be one of the designated string values.", "x" = "It was given as {wrong_spec_string(rounding)}.", - "i" = "See documentation for `grim()`, section `Rounding`." + "i" = "See `vignette(\"rounding-options\")`." )) ) } @@ -84,9 +84,8 @@ reconstruct_rounded_numbers <- Vectorize(reconstruct_rounded_numbers_scalar, #' (i.e., mean or percentage within `grim()`, or standard deviation within #' `debit()`). #' @param rounding String. The rounding method that is supposed to have been -#' used originally. See documentation for `grim()`, section `Rounding`. -#' Default is `"up_or_down"`, which returns two values: `x` rounded up *and* -#' down. +#' used originally. See `vignette("rounding-options")`. Default is +#' `"up_or_down"`, which returns two values: `x` rounded up *and* down. #' @param threshold Integer. If `rounding` is set to `"up_from"`, `"down_from"`, #' or `"up_from_or_down_from"`, `threshold` must be set to the number from #' which the reconstructed values should then be rounded up or down. Otherwise diff --git a/man/grim_plot.Rd b/man/grim_plot.Rd index ce3330d..7e45f4e 100644 --- a/man/grim_plot.Rd +++ b/man/grim_plot.Rd @@ -105,9 +105,8 @@ with \code{digits} and \code{rounding}. With \code{grim_map()}'s default for \code{rounding}, \code{"up_or_down"}, strikingly few values are flagged as inconsistent for sample sizes 40 and 80 (or 4 and 8). -This effect disappears if \code{rounding} is set to any other value. For a list -of values that \code{rounding} can take, see documentation for \code{grim()}, section -\code{Rounding}. +This effect disappears if \code{rounding} is set to any other value (see +\code{vignette("rounding-options")}). The 4/8 leniency effect arises because accepting values rounded either up or down is more careful and conservative than any other rounding procedure. diff --git a/man/reround.Rd b/man/reround.Rd index 7fdcd0c..46449a0 100644 --- a/man/reround.Rd +++ b/man/reround.Rd @@ -20,9 +20,8 @@ reround( \code{debit()}).} \item{rounding}{String. The rounding method that is supposed to have been -used originally. See documentation for \code{grim()}, section \code{Rounding}. -Default is \code{"up_or_down"}, which returns two values: \code{x} rounded up \emph{and} -down.} +used originally. See \code{vignette("rounding-options")}. Default is +\code{"up_or_down"}, which returns two values: \code{x} rounded up \emph{and} down.} \item{threshold}{Integer. If \code{rounding} is set to \code{"up_from"}, \code{"down_from"}, or \code{"up_from_or_down_from"}, \code{threshold} must be set to the number from