hi.  i've looked for (and not found) an assert() function.  needing one,
i created the following (from stop()).  i'm posting it in case 1)
someone sees a problem with this; and 2) someone else has a need.

cheers, Greg
----
## an assert mechanism...
assert <- function (shouldbe, ...) {
  if (!shouldbe) {
    .Internal(stop(as.logical(TRUE),
                   .makeMessage("assertion failure: ", ..., domain = NULL)))
  }
}

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to