[R-pkg-devel] \donttest{} and writing outputs to tempdir()

Jeff Newmiller jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Wed Jun 2 07:29:01 CEST 2021


Make examples shorter so they can run faster. Wrapping everything in donttest means that running examples() does nothing, which is counterproductive.

Techinically, vignettes are not tests or examples... but they do have the advantage that they don't have to run quickly. But that doesn't make a vignette a substitute for either examples or tests.

As for writing to the wrong place, you should probably just double check. 

On June 1, 2021 9:39:43 PM PDT, Danielle Maeser <maese005 using umn.edu> wrote:
>Hello,
>
>I received the following comments from a CRAN maintainer, and I don't
>understand why they were an issue. I'd appreciate any insight you can
>provide.
>
>Danielle
>
>
>
>
>
>
>
>*All your examples are wrapped in \donttest{} and therefore do not
>gettested.Please unwrap the examples if that is feasible and if they
>can
>beexecuted in < 5 sec for each Rd file or create additionally small
>toyexamples to allow automatic testing.*
>
>I don't think I can unwrap the examples in \donttest{} because they
>cannot
>be executed in <5 seconds for each Rd file, and the automatic testing
>of
>toy data is satisfied in the vignettes I provide for each function.
>Therefore, I am not sure what change to make here.
>
>
>
>
>*Please ensure that your functions do not write by default or in
>yourexamples/vignettes/tests in the user's home filespace (including
>thepackage directory and getwd()). This is not allowed by CRAN
>policies.In
>your examples/vignettes/tests you can write to tempdir().*
>
>Additionally, all of my vignettes write the output of each function to
>tempdir(). Therefore, I am not sure why this is a problem.

-- 
Sent from my phone. Please excuse my brevity.



More information about the R-package-devel mailing list