Re: [R-pkg-devel] Usage of internet resources in examples

2020-10-21 Thread Andy Teucher
Thanks Martin, I agree that the example should run for a user when calling example() - hence I am going with a simple try() around the function calls in the examples. I agree your more sophisticated version has better behaviour, but I don’t want to clutter the examples with code that might

Re: [R-pkg-devel] Usage of internet resources in examples

2020-10-21 Thread Martin Maechler
> Ben Bolker > on Tue, 20 Oct 2020 17:07:10 -0400 writes: > On 10/20/20 4:51 PM, Gábor Csárdi wrote: >> On Tue, Oct 20, 2020 at 9:45 PM Ben Bolker wrote: >> [...] >>> if (testthat::skip_on_cran()) >>> >>> all seem like reasonable solutions. >> >> I

Re: [R-pkg-devel] Usage of internet resources in examples

2020-10-20 Thread Gábor Csárdi
On Tue, Oct 20, 2020 at 10:07 PM Ben Bolker wrote: > > > > On 10/20/20 4:51 PM, Gábor Csárdi wrote: > > On Tue, Oct 20, 2020 at 9:45 PM Ben Bolker wrote: > > [...] > >> if (testthat::skip_on_cran()) > >> > >> all seem like reasonable solutions. > > > > I don't think you can use

Re: [R-pkg-devel] Usage of internet resources in examples

2020-10-20 Thread Ben Bolker
On 10/20/20 5:10 PM, Gábor Csárdi wrote: On Tue, Oct 20, 2020 at 10:07 PM Ben Bolker wrote: On 10/20/20 4:51 PM, Gábor Csárdi wrote: On Tue, Oct 20, 2020 at 9:45 PM Ben Bolker wrote: [...] if (testthat::skip_on_cran()) all seem like reasonable solutions. I don't think you can

Re: [R-pkg-devel] Usage of internet resources in examples

2020-10-20 Thread Gábor Csárdi
On Tue, Oct 20, 2020 at 9:45 PM Ben Bolker wrote: [...] >if (testthat::skip_on_cran()) > > all seem like reasonable solutions. I don't think you can use `testthat::skip_on_cran()` for this, it does not return a logical flag: ❯ isTRUE(testthat::skip_on_cran()) Error: Reason: On CRAN It only

[R-pkg-devel] Usage of internet resources in examples

2020-10-20 Thread Andy Teucher
Our package bcdata (https://cran.r-project.org/package=bcdata) retrieves public data from British Columbia data services, so the examples are dependent on successfully hitting web resources. When we initially submitted to CRAN the examples were wrapped in \dontrun{}, but we were asked to change