Skip to content
Prev 5762 / 12125 Next

[R-pkg-devel] [External] Re: Interpret feedback: not write testthat-tests in examples

FWIW/in defense of the OP, this is a *very* common idiom in the base R 
code base.? There may be some false positives, but

 ?find . -name "*.Rd" -exec grep -Fl "stopifnot(" {} \; | grep -v doc | wc

lists 187 files, e.g. from src/library/utils/man/object.size.Rd

stopifnot(identical( ## assert that all three are the same :
 ???????????? unique(substr(as.vector(fsl), 1,5)),
 ???????????? format(round(as.vector(sl)/1024, 1))))
On 7/16/20 2:02 PM, luke-tierney at uiowa.edu wrote: