Skip to content

docs: guard bacondecomp examples with requireNamespace (#260)#262

Open
LeonidasZhak wants to merge 2 commits into
gregfaletto:mainfrom
LeonidasZhak:docs/guard-bacondecomp-examples-260
Open

docs: guard bacondecomp examples with requireNamespace (#260)#262
LeonidasZhak wants to merge 2 commits into
gregfaletto:mainfrom
LeonidasZhak:docs/guard-bacondecomp-examples-260

Conversation

@LeonidasZhak

Copy link
Copy Markdown
Contributor

Summary

Wraps the main @examples blocks of fetwfe() and betwfe() in if (requireNamespace("bacondecomp", quietly = TRUE)) { ... } so that example(fetwfe) / example(betwfe) does not error for users who do not have bacondecomp installed.

Fixes #260.

Changes

  • R/fetwfe.R: Wrapped the main fetwfe() example block in requireNamespace guard
  • R/betwfe_core.R: Wrapped the main betwfe() example block in requireNamespace guard
  • man/*.Rd: Regenerated by roxygen2

Validation

  • tools::checkRd() passes for both man pages
  • R CMD check --no-manual --no-vignettes --no-tests examples check: OK
  • No test changes needed (roxygen-only fix)

Wrap the main @examples blocks of fetwfe() and betwfe() in
if (requireNamespace('bacondecomp', quietly = TRUE)) so that
example(fetwfe) / example(betwfe) does not error for users who
do not have bacondecomp installed.

Fixes gregfaletto#260.
…p-examples-260

# Conflicts:
#	R/betwfe_core.R
#	R/fetwfe.R
#	man/betwfe.Rd
#	man/fetwfe.Rd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs] Guard library(bacondecomp) in fetwfe()/betwfe() runnable examples (requireNamespace)

1 participant