Skip to content

Commit

Permalink
Make isFALSE() like base::isFALSE()
Browse files Browse the repository at this point in the history
  • Loading branch information
cderv committed Nov 24, 2022
1 parent 273404e commit e73947c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ in_dir = function(dir, expr) {

#' Test if an object is identical to \code{FALSE}
#'
#' A simple abbreviation of \code{identical(x, FALSE)}.
#' @param x An R object.
#' @export
#' @examples
#' library(xfun)
#' isFALSE(TRUE) # false
#' isFALSE(FALSE) # true
#' isFALSE(c(FALSE, FALSE)) # false
isFALSE = function(x) identical(x, FALSE)
# TODO: replace by base::isFALSE() when min R for knitr will be 3.5.0
isFALSE = function(x) is.logical(x) && length(x) == 1L && !is.na(x) && !x

#' Parse R code and do not keep the source
#'
Expand Down
2 changes: 1 addition & 1 deletion man/isFALSE.Rd

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

0 comments on commit e73947c

Please # to comment.