[R] Should I wrap more package examples in \dontrun{} ?

Hadley Wickham h.wickham at gmail.com
Tue Sep 3 19:53:27 CEST 2013


> As a user of your package, I would find it irritating if example(foo) didn't
> run anything.   It would be more irritating (and would indicate sloppiness
> on your part) if the examples failed when I cut and pasted them.  These both
> suggest leaving the examples running.
>
> As the author of your package, it sounds as though you find it quite
> irritating when other authors break your code.
>
> Isn't the right solution to this to work with the other package authors to
> come up with code that is unlikely to break?  If that's not possible, then
> maybe don't use those packages that cause you trouble.

It was my understanding that package authors are responsible for not
breaking other CRAN packages without warning.  For example, before I
release a new version of plyr or ggplot2, I run R CMD check on every
package that depends on my package. I then let the maintainers know if
something is broken - sometimes it's because I introduced a bug, and
other times it's because I'm enforcing a stricter check than I did
previously

Hadley

-- 
Chief Scientist, RStudio
http://had.co.nz/



More information about the R-help mailing list