Re: [Rd] testing dontrun examples

2014-11-27 Thread Dirk Eddelbuettel
On 27 November 2014 at 11:23, Paul Gilbert wrote: | On 14-11-26 05:49 PM, Duncan Murdoch wrote: | > On 26/11/2014, 1:45 PM, Paul Gilbert wrote: | >> Wishlist: what I would really like is R CMD check --run-dontrun pkg | > | > We have that in R-devel, so everyone will have it next April, but there

Re: [Rd] testing dontrun examples

2014-11-27 Thread Paul Gilbert
On 14-11-26 05:49 PM, Duncan Murdoch wrote: On 26/11/2014, 1:45 PM, Paul Gilbert wrote: Is there a good strategy for testing examples which should not be run by default? For instance, I have examples which get data from the Internet. If I wrap them in try() then they can be skipped if the Inte

Re: [Rd] testing dontrun examples

2014-11-26 Thread Duncan Murdoch
On 26/11/2014, 1:45 PM, Paul Gilbert wrote: > Is there a good strategy for testing examples which should not be run by > default? For instance, I have examples which get data from the Internet. > If I wrap them in try() then they can be skipped if the Internet is not > available, but may not be

Re: [Rd] testing dontrun examples

2014-11-26 Thread Tim Keitt
On Wed, Nov 26, 2014 at 12:45 PM, Paul Gilbert wrote: > Is there a good strategy for testing examples which should not be run by > default? For instance, I have examples which get data from the Internet. If > I wrap them in try() then they can be skipped if the Internet is not > available, but ma

Re: [Rd] testing dontrun examples

2014-11-26 Thread Hadley Wickham
You can try devtools::run_examples(test = TRUE) (assuming your working directory is the top-level package directory) Hadley On Wed, Nov 26, 2014 at 12:45 PM, Paul Gilbert wrote: > Is there a good strategy for testing examples which should not be run by > default? For instance, I have examples w

Re: [Rd] testing dontrun examples

2014-11-26 Thread Paul Gilbert
On 14-11-26 02:09 PM, Spencer Graves wrote: Hi, Paul: "if(!fda::CRAN())" runs code except with "R CMD check –as-cran". I use it so CRAN checks skip examples that (a) need the Internet or (b) take too long for CRAN. Spencer fda::CRAN() gives TRUE on my home machine, I think because I u

Re: [Rd] testing dontrun examples

2014-11-26 Thread Spencer Graves
Hi, Paul: "if(!fda::CRAN())" runs code except with "R CMD check –as-cran". I use it so CRAN checks skip examples that (a) need the Internet or (b) take too long for CRAN. Hope this helps. Spencer On 11/26/2014 10:45 AM, Paul Gilbert wrote: Is there a good strategy fo

[Rd] testing dontrun examples

2014-11-26 Thread Paul Gilbert
Is there a good strategy for testing examples which should not be run by default? For instance, I have examples which get data from the Internet. If I wrap them in try() then they can be skipped if the Internet is not available, but may not be tested in cases when I would like to know about the