ThinkR-open / checkhelper

A package to help deal with devtools::check outputs
https://thinkr-open.github.io/checkhelper/
Other
34 stars 4 forks source link

interactive() in examples #87

Open JosiahParry opened 8 months ago

JosiahParry commented 8 months ago

Following the instructions at https://github.com/ThinkR-open/prepare-for-cran I am trying to use checkhelper::check_clean_userspace() however, I have examples in my code that are wrapped with if (interactive()). I use the RStudio shortcut cmd + shift + e to run my checks which is non-interactive. But using the terminal with this, the examples are executed (same with devtools::run_examples()). Is there a way to ensure that interactive() is false when using checkhelper?

I suppose I could try Rscript -e "checkhelper::check_clean_userspace()" but it feels a little awkward