Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider @examplesIf in documentation #564

Open
wibeasley opened this issue Jan 11, 2025 · 0 comments
Open

Consider @examplesIf in documentation #564

wibeasley opened this issue Jan 11, 2025 · 0 comments
Assignees

Comments

@wibeasley
Copy link
Member

https://r-pkgs.org/man.html#sec-man-examples-dependencies-conditional-execution

Advantages are

  • Users won’t actually see the if() { … } machinery when they are reading your documentation from within R or on a pkgdown website. Users only see realistic code.
  • The example code renders fully in pkgdown.
  • The example code runs when it should and does not run when it should not.
  • This doesn’t run afoul of CRAN’s prohibition of putting all your example code inside \dontrun{}.
@wibeasley wibeasley self-assigned this Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant