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 just
> 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 d
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 `testthat::ski
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 u
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 `testthat::skip_on_cran()` for this, it does
not return a logical flag:
❯ isTRUE(testthat::skip
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
Depending on what you want to do,
if (interactive())
or
try() (in the examples, not in the function)
or
if (testthat::skip_on_cran())
all seem like reasonable solutions.
On 10/20/20 4:28 PM, Andy Teucher wrote:
Our package bcdata (https://cran.r-project.org/package=bcdata) retri