# get function from namespace instead of possibly getting
# implementation shipped with recent R versions:
bp_stopifnot = getFromNamespace("stopifnot", "backports")
m <- matrix(c(1, 3, 12, 1), 2, 2)
if (FALSE) bp_stopifnot("m must be symmetric" = m == t(m))
Run the code above in your browser using DataLab