3 ms·
Hmm, so would you agree with the package vignette? "Tests and documentation are similar, but not identical. Tests need to cover difficult corner cases. Example
by dash2 4y ago
Hmm, so would you agree with the package vignette?
"Tests and documentation are similar, but not identical. Tests need to cover difficult corner cases. Examples need to convey the basics to the user. I like the following advice:
… write the best possible documentation, and [R] makes sure the code samples in your documentation actually compile and run [and do what they are supposed to do]
...
In particular, use doctest as an addition to manually created tests, not a substitute for them. Use doctest to make sure your examples do what they expect, and for simple tests of basic functionality."