checkhelper
checkhelper copied to clipboard
interactive() in examples
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