Re: [R-pkg-devel] Run-times of examples in vignettes

2020-10-27 Thread Thierry Onkelinx
My solution is similar to Ben's solution. Except that the code for creating the data is in the vignette. The chunk only runs when the data is not available. The trick is to pass code to the eval argument instead of a fixed TRUE or FALSE. See https://github.com/ropensci/git2rdata/blob/bad8a4cf42049f

Re: [R-pkg-devel] Run-times of examples in vignettes

2020-10-27 Thread Ben Bolker
My general solution is to run time-consuming computations in advance and store the results in (e.g.) inst/vignette_data, whence they can be retrieved via system.file("vignette_data", "output.rda", package="my_pkg"). (I might also include the R script required to generate the file so that I

Re: [R-pkg-devel] Run-times of examples in vignettes

2020-10-27 Thread Helmut Schütz
Hi Dirk, Dirk Eddelbuettel wrote on 2020-10-27 13:32: | is there somewhere an official statement about the maximum run-times of | examples in vignettes? Seven minutes is excessive. Sure. The one vignette contains simulation code which needs 1E5 to 1E6 sims to get a stable result. Fewer sims

Re: [R-pkg-devel] Run-times of examples in vignettes

2020-10-27 Thread Dirk Eddelbuettel
On 27 October 2020 at 12:21, Helmut Schütz wrote: | is there somewhere an official statement about the maximum run-times of | examples in vignettes? Seven minutes is excessive. I have (long) gone by the rule of "about one minute" each for tests and examples. Rcpp is slightly above [1], especial

[R-pkg-devel] Run-times of examples in vignettes

2020-10-27 Thread Helmut Schütz
Dear all, is there somewhere an official statement about the maximum run-times of examples in vignettes? Currently I got for our seven vignettes on my six-years old machine 7.9 minutes. One of them (containing a lot of simulation code) take 7.1 minutes. Hence, in the submission we asked for