The R Project SVN R

Rev

Rev 61173 | Rev 68948 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 61173 Rev 63173
Line 30... Line 30...
30
}
30
}
31
}
31
}
32
\value{
32
\value{
33
  (\code{\link{NULL}} if all statements in \code{\dots} are \code{TRUE}.)
33
  (\code{\link{NULL}} if all statements in \code{\dots} are \code{TRUE}.)
34
}
34
}
35
\seealso{\code{\link{stop}}, \code{\link{warning}}.}
35
\seealso{\code{\link{stop}}, \code{\link{warning}};
-
 
36
  \code{\link{assertCondition}} in package \pkg{tools} complements
-
 
37
  \code{stopifnot()} for testing warnings and errors.
-
 
38
}
36
\examples{
39
\examples{
37
stopifnot(1 == 1, all.equal(pi, 3.14159265), 1 < 2) # all TRUE
40
stopifnot(1 == 1, all.equal(pi, 3.14159265), 1 < 2) # all TRUE
38
 
41
 
39
m <- matrix(c(1,3,3,1), 2, 2)
42
m <- matrix(c(1,3,3,1), 2, 2)
40
stopifnot(m == t(m), diag(m) == rep(1, 2)) # all(.) |=>  TRUE
43
stopifnot(m == t(m), diag(m) == rep(1, 2)) # all(.) |=>  TRUE