Skip to content
Prev 6375 / 12125 Next

[R-pkg-devel] CRAN packages suggesting other packages but not using them conditionally

On 2020-12-12 19:50, Duncan Murdoch wrote:
I want to put all the tests of a particular function in the 
"\examples" section.  If some things are too pedantic to show to a user, 
I can put them in "\dontshow".  If they run too long for CRAN, I wrap 
them in "if(!fda::CRAN()){...}", as I previously noted.


	  Putting slow tests in a "slowtest" directory to me violates a 
sensible rule of documentation, because it makes it harder to think 
about how complete a test suite is.


	  I probably should not broaden this discussion to include "\dontrun", 
but I will:  I think any example in "\dontrun" should be made to work 
and wrapped in something like "if(!fda::CRAN()){...}" if you don't want 
it to be run on CRAN, where you don't care if it breaks or not.  I've 
read too many books with examples that didn't work!  The "fda" package 
has 76 reverse dependencies.  I think most of those are attributable to 
the quality of the fundamental ideas, but I'd like to think that some of 
them are because I insisted in included decent unit tests in the 
"\examples" -- AND because I insisted on make sure all but a couple of 
the examples in the book actually worked!


	  Thanks very much to everyone who has contributed to this thread.  I 
don't think we've reached a consensus, but we've had a good discussion 
and may eventually help improve package documentation and testing 
practices in the future.


	  Spencer

Thread (15 messages)