Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# development version
* Bounds checking allow option for checking open vs. closed intervals (less than
or equal to vs less than, and the same for greater) (#215)

# Version 2.2.0
* Fixed C compiler warnings for windows
* Added `checkPermutation` (#230).
Expand Down
4 changes: 2 additions & 2 deletions R/checkDouble.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#' testDouble(1)
#' testDouble(1L)
#' testDouble(1, min.len = 1, lower = 0)
checkDouble = function(x, lower = -Inf, upper = Inf, finite = FALSE, any.missing = TRUE, all.missing = TRUE, len = NULL, min.len = NULL, max.len = NULL, unique = FALSE, sorted = FALSE, names = NULL, typed.missing = FALSE, null.ok = FALSE) {
.Call(c_check_double, x, lower, upper, finite, any.missing, all.missing, len, min.len, max.len, unique, sorted, names, typed.missing, null.ok)
checkDouble = function(x, lower = -Inf, upper = Inf, finite = FALSE, any.missing = TRUE, all.missing = TRUE, len = NULL, min.len = NULL, max.len = NULL, unique = FALSE, sorted = FALSE, names = NULL, typed.missing = FALSE, null.ok = FALSE, lower.equal = TRUE, upper.equal = TRUE) {
.Call(c_check_double, x, lower, upper, finite, any.missing, all.missing, len, min.len, max.len, unique, sorted, names, typed.missing, null.ok, lower.equal, upper.equal)
}

#' @export
Expand Down
4 changes: 2 additions & 2 deletions R/checkInt.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#' @examples
#' testInt(1)
#' testInt(-1, lower = 0)
checkInt = function(x, na.ok = FALSE, lower = -Inf, upper = Inf, tol = sqrt(.Machine$double.eps), null.ok = FALSE) {
.Call(c_check_int, x, na.ok, lower, upper, tol, null.ok)
checkInt = function(x, na.ok = FALSE, lower = -Inf, upper = Inf, tol = sqrt(.Machine$double.eps), null.ok = FALSE, lower.equal = TRUE, upper.equal = TRUE) {
.Call(c_check_int, x, na.ok, lower, upper, tol, null.ok, lower.equal, upper.equal)
}

#' @export
Expand Down
4 changes: 2 additions & 2 deletions R/checkInteger.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#' testInteger(1L)
#' testInteger(1.)
#' testInteger(1:2, lower = 1, upper = 2, any.missing = FALSE)
checkInteger = function(x, lower = -Inf, upper = Inf, any.missing = TRUE, all.missing = TRUE, len = NULL, min.len = NULL, max.len = NULL, unique = FALSE, sorted = FALSE, names = NULL, typed.missing = FALSE, null.ok = FALSE) {
.Call(c_check_integer, x, lower, upper, any.missing, all.missing, len, min.len, max.len, unique, sorted, names, typed.missing, null.ok)
checkInteger = function(x, lower = -Inf, upper = Inf, any.missing = TRUE, all.missing = TRUE, len = NULL, min.len = NULL, max.len = NULL, unique = FALSE, sorted = FALSE, names = NULL, typed.missing = FALSE, null.ok = FALSE, lower.equal = TRUE, upper.equal = TRUE) {
.Call(c_check_integer, x, lower, upper, any.missing, all.missing, len, min.len, max.len, unique, sorted, names, typed.missing, null.ok, lower.equal, upper.equal)
}

#' @export
Expand Down
4 changes: 2 additions & 2 deletions R/checkIntegerish.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#' testIntegerish(1L)
#' testIntegerish(1.)
#' testIntegerish(1:2, lower = 1L, upper = 2L, any.missing = FALSE)
checkIntegerish = function(x, tol = sqrt(.Machine$double.eps), lower = -Inf, upper = Inf, any.missing = TRUE, all.missing = TRUE, len = NULL, min.len = NULL, max.len = NULL, unique = FALSE, sorted = FALSE, names = NULL, typed.missing = FALSE, null.ok = FALSE) {
.Call(c_check_integerish, x, tol, lower, upper, any.missing, all.missing, len, min.len, max.len, unique, sorted, names, typed.missing, null.ok)
checkIntegerish = function(x, tol = sqrt(.Machine$double.eps), lower = -Inf, upper = Inf, any.missing = TRUE, all.missing = TRUE, len = NULL, min.len = NULL, max.len = NULL, unique = FALSE, sorted = FALSE, names = NULL, typed.missing = FALSE, null.ok = FALSE, lower.equal = TRUE, upper.equal = TRUE) {
.Call(c_check_integerish, x, tol, lower, upper, any.missing, all.missing, len, min.len, max.len, unique, sorted, names, typed.missing, null.ok, lower.equal, upper.equal)
}

#' @export
Expand Down
4 changes: 2 additions & 2 deletions R/checkNumber.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#' @examples
#' testNumber(1)
#' testNumber(1:2)
checkNumber = function(x, na.ok = FALSE, lower = -Inf, upper = Inf, finite = FALSE, null.ok = FALSE) {
.Call(c_check_number, x, na.ok, lower, upper, finite, null.ok)
checkNumber = function(x, na.ok = FALSE, lower = -Inf, upper = Inf, finite = FALSE, null.ok = FALSE, lower.equal = TRUE, upper.equal = TRUE) {
.Call(c_check_number, x, na.ok, lower, upper, finite, null.ok, lower.equal, upper.equal)
}

#' @export
Expand Down
4 changes: 2 additions & 2 deletions R/checkNumeric.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#' @examples
#' testNumeric(1)
#' testNumeric(1, min.len = 1, lower = 0)
checkNumeric = function(x, lower = -Inf, upper = Inf, finite = FALSE, any.missing = TRUE, all.missing = TRUE, len = NULL, min.len = NULL, max.len = NULL, unique = FALSE, sorted = FALSE, names = NULL, typed.missing = FALSE, null.ok = FALSE) {
.Call(c_check_numeric, x, lower, upper, finite, any.missing, all.missing, len, min.len, max.len, unique, sorted, names, typed.missing, null.ok)
checkNumeric = function(x, lower = -Inf, upper = Inf, finite = FALSE, any.missing = TRUE, all.missing = TRUE, len = NULL, min.len = NULL, max.len = NULL, unique = FALSE, sorted = FALSE, names = NULL, typed.missing = FALSE, null.ok = FALSE, lower.equal = TRUE, upper.equal = TRUE) {
.Call(c_check_numeric, x, lower, upper, finite, any.missing, all.missing, len, min.len, max.len, unique, sorted, names, typed.missing, null.ok, lower.equal, upper.equal)
}

#' @export
Expand Down
4 changes: 4 additions & 0 deletions man-roxygen/bounds.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#' @param lower [\code{numeric(1)}]\cr
#' Lower value all elements of \code{x} must be greater than or equal to.
#' @param lower.equal [\code{logical(1)}]\cr
#' Should the lower value allow \code{x == lower}?
#' @param upper [\code{numeric(1)}]\cr
#' Upper value all elements of \code{x} must be lower than or equal to.
#' @param upper.equal [\code{logical(1)}]\cr
#' Should the upper value allow \code{x == upper}?
6 changes: 6 additions & 0 deletions man/asInteger.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 24 additions & 4 deletions man/checkDouble.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 24 additions & 4 deletions man/checkInt.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 24 additions & 4 deletions man/checkInteger.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading