Learnr Tutorials in CRAN Packages Tests #661
-
I am trying to publish a package (https://github.com/risktoollib/RTLedu) accompanying my main CRAN package (https://github.com/risktoollib/RTL). The former contains learnr tutorials and it both spins forever on R-CMD-Check and CRAN tests pick it out. I tried /dontrun but they don't like it. See https://github.com/risktoollib/RTLedu/blob/master/R/riskintopractice-energy.R for a reproducible example. Anything you could send me as a resource to help resolve would be extremely appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @risktoollib, I'd recommend using
If for some reason this example comes up in the CRAN review, I would politely explain to the reviewer that the function starts an interactive Shiny web app and is only meant to be run interactively. There are also many packages currently on CRAN that use this pattern, I could help you dig up a couple examples if it comes to that. Also, would you mind if I added your package to our show-and-tell discussion section? https://github.com/rstudio/learnr/discussions/categories/show-and-tell |
Beta Was this translation helpful? Give feedback.
Hi @risktoollib, I'd recommend using
if (interactive())
in your example to indicate that the function should only be run interactively. This will fix the R CMD check problem and I hope that CRAN would accept that solution.If for some reason this example comes up in the CRAN review, I would politely explain to the reviewer that the function starts an interactive Shiny web app and is only meant to be run interactively. There are also many packages currently on CRAN that use this pattern, I could help you dig up a couple examples if it comes to that.
Also, would you mind if I added your package to our show-and-tell dis…