From 905edeaa6c6bc73e284f2695fb9a2b824a0848b8 Mon Sep 17 00:00:00 2001 From: brodieG Date: Sun, 3 Sep 2017 21:14:25 -0400 Subject: [PATCH] Fix #51 --- R/all-bw.R | 10 ++++++---- man/all_bw.Rd | 14 +++++--------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/R/all-bw.R b/R/all-bw.R index 8f16a58..5d6bbd5 100644 --- a/R/all-bw.R +++ b/R/all-bw.R @@ -6,9 +6,10 @@ #' #' You can modify the comparison to be strictly greater/less than via the #' `bounds` parameter, and the treatment of NAs with `na.rm`. Note that NAs are -#' considered to be considered to be out of bounds by default. While -#' possibly incorrect, this is both conservative and convenient. Zero length -#' `x` will always succeed. +#' considered to be out of bounds by default. While semantically incorrect +#' since we cannot know whether an NA value is in or out of bounds, this +#' assumption is both conservative and convenient. Zero length `x` will always +#' succeed. #' #' If `x` and `lo`/`hi` are different types, `lo`/`hi` will be coerced to the #' type of `x`. When `lo`/`hi` are numeric and `x` is integer, if `lo`/`hi` @@ -32,8 +33,9 @@ #' @param bounds `character(1L)` for values between `lo` and `hi`: #' * \dQuote{[]} include `lo` and `hi` #' * \dQuote{()} exclude `lo` and `hi` -#' * \dQuote{[)} include `lo`, exclude `hi` #' * \dQuote{(]} exclude `lo`, include `hi` +#' * \dQuote{[)} include `lo`, exclude `hi` +#' #' @return TRUE if all values in `x` conform to the specified bounds, a string #' describing the first position that fails otherwise #' @examples diff --git a/man/all_bw.Rd b/man/all_bw.Rd index cf8fbeb..88516f2 100644 --- a/man/all_bw.Rd +++ b/man/all_bw.Rd @@ -27,13 +27,8 @@ treat them as always being out of bounds.} \itemize{ \item \dQuote{[]} include \code{lo} and \code{hi} \item \dQuote{()} exclude \code{lo} and \code{hi} -\item \dQuote{[)} include \code{lo}, exclude \code{hi} \item \dQuote{(]} exclude \code{lo}, include \code{hi} -} - -[)} include \code{lo}, exclude \code{hi} -\itemize{ -\item \dQuote{(]: R:)%7D%20include%20%60lo%60,%20exclude%20%60hi%60%0A%20%20*%20%5CdQuote%7B( +\item \dQuote{[)} include \code{lo}, exclude \code{hi} }} } \value{ @@ -48,9 +43,10 @@ describing why not all values are in range instead of FALSE on failure. \details{ You can modify the comparison to be strictly greater/less than via the \code{bounds} parameter, and the treatment of NAs with \code{na.rm}. Note that NAs are -considered to be considered to be out of bounds by default. While -possibly incorrect, this is both conservative and convenient. Zero length -\code{x} will always succeed. +considered to be out of bounds by default. While semantically incorrect +since we cannot know whether an NA value is in or out of bounds, this +assumption is both conservative and convenient. Zero length \code{x} will always +succeed. If \code{x} and \code{lo}/\code{hi} are different types, \code{lo}/\code{hi} will be coerced to the type of \code{x}. When \code{lo}/\code{hi} are numeric and \code{x} is integer, if \code{lo}/\code{hi}