Index: src/library/base/R/identical.R =================================================================== --- src/library/base/R/identical.R (revision 50027) +++ src/library/base/R/identical.R (working copy) @@ -18,3 +18,5 @@ .Internal(identical(x,y, num.eq, single.NA, attrib.as.set)) isTRUE <- function(x) identical(TRUE, x) + +isFALSE <- function(x) identical(FALSE, x) Index: src/library/base/man/Logic.Rd =================================================================== --- src/library/base/man/Logic.Rd (revision 50027) +++ src/library/base/man/Logic.Rd (working copy) @@ -14,6 +14,7 @@ xor(x, y) isTRUE(x) +isFALSE(x) } \alias{!} \alias{&} @@ -23,6 +24,7 @@ \alias{xor} \alias{Logic} \alias{isTRUE} +\alias{isFALSE} \description{ These operators act on logical and number-like vectors. } @@ -48,7 +50,11 @@ \code{isTRUE(x)} is an abbreviation of \code{identical(TRUE, x)}, and so is true if and only if \code{x} is a length-one logical vector with no attributes (not even names). - + + \code{isFALSE(x)} is an abbreviation of \code{identical(FALSE, x)}, and + so is true if and only if \code{x} is a length-one logical vector with + no attributes (not even names). + Numeric and complex vectors will be coerced to logical values, with zero being false and all non-zero values being true. Raw vectors are handled without any coercion for \code{!}, \code{&}, \code{|} and @@ -87,7 +93,7 @@ used. For arrays (and an array result) the dimensions and dimnames are taken from first argument if it is an array, otherwise the second. - For \code{||}, \code{&&} and \code{isTRUE}, a length-one logical vector. + For \code{||}, \code{&&}, \code{isFALSE} and \code{isTRUE}, a length-one logical vector. } \section{S4 methods}{ \code{!}, \code{&} and \code{|} are S4 generics, the latter two part Index: src/library/base/man/identical.Rd =================================================================== --- src/library/base/man/identical.Rd (revision 50027) +++ src/library/base/man/identical.Rd (working copy) @@ -85,7 +85,8 @@ \seealso{ \code{\link{all.equal}} for descriptions of how two objects differ; \link{Comparison} for operators that generate elementwise comparisons. - \code{\link{isTRUE}} is a simple wrapper based on \code{identical}. + \code{\link{isTRUE}} and \code{\link{isFALSE}} are simple + wrappers based on \code{identical}. } \examples{ identical(1, NULL) ## FALSE -- don't try this with ==