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

Improve readme code example #348

Merged
merged 1 commit into from
Feb 26, 2024
Merged

Improve readme code example #348

merged 1 commit into from
Feb 26, 2024

Conversation

nanxstats
Copy link
Collaborator

This PR improves the code example in README.Rmd:

  • Update code so it works with under the latest API (fixed_design() -> fix_design_ahr()).
  • Remove unnecessary library() calls and only keep gsDesign2. Qualify the other namespaces explicitly.
  • Add code chunks for table rendering purposes and remove gt::as_raw_html() from the code chunk for display to reduce confusion and visual clutter.
  • Render and refresh README.md so the output reflects the latest table output format.

Also, importantly:

  • Use the native pipe |> (as in the purrr readme) to avoid the magrittr dependency where appropriate and possible. This means readme can use |>, but not roxygen2 code examples, which would trigger Depends: R >= 4.1.0 checks.
  • In the relevant code chunks, eval is set to getRversion() >= "4.1" so the code chunks will only run when |> exists.

Copy link
Collaborator

@LittleBeannie LittleBeannie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the edits!

@LittleBeannie LittleBeannie merged commit f475b7a into main Feb 26, 2024
8 checks passed
@LittleBeannie LittleBeannie deleted the readme branch February 26, 2024 15:01
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.

2 participants