Skip to content
Prev 47487 / 63424 Next

Using unit-tests as examples

You are probably wisest to follow Hadley's recommendation.  
[library(fortunes);  fortune(298)]


       However, my help files contain various constructs of the 
following form:


\dontshow{stopifnot(}
all.equal(fa, fa0)
\dontshow{)}


       where "fa" is returned by a function, and "fa0" is a manual 
computation of what I think the answer should be.


       Spencer Graves
On 1/20/2014 5:33 AM, Hadley Wickham wrote: