What's the recommend approach to not run examples only on the pkgdown site or examples that produce an output that's barely readable/intelligible for users?
People at CRAN complain about the use of \dontrun{}
in example 1 and example 2.
Example 1 prints a (very) long markdown image link which is of no use for users. Example 2 can run properly locally but won't work on the pkgdown site because of withr::local_tempfile()
. Instead, the example will throw a cannot open the connection
error as shown here.
Would wrapping example 2 in
if (interactive()) {
...
}
prevent the example from being run on the pkgdown site?