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

Add parameter definitions to summarize.R #41

Merged
merged 6 commits into from
Oct 11, 2024

Conversation

awasyn
Copy link
Collaborator

@awasyn awasyn commented Oct 5, 2024

Description

What kind of change(s) are included?

  • Bug fix (fixes check).
  • Enhancement (documentation).

Checklist

Please ensure that all boxes are checked before indicating that this pull request is ready for review.

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have searched for existing content to ensure this is not a duplicate.
  • I have performed a self-review of these additions (including spelling, grammar, and related).
  • I have added comments to my code to help provide understanding.
  • I have added a test which covers the code changes found within this PR.
  • I have deleted all non-relevant text in this pull request template.
  • Reviewer assignment: Tag a relevant team member to review and approve the changes.

@awasyn
Copy link
Collaborator Author

awasyn commented Oct 5, 2024

@d33bs

@jananiravi jananiravi requested a review from the-mayer October 5, 2024 21:52
@the-mayer the-mayer self-assigned this Oct 10, 2024
@the-mayer the-mayer added the documentation Improvements or additions to documentation, incl. R docstring/roxygen2 label Oct 10, 2024
@awasyn awasyn mentioned this pull request Oct 10, 2024
9 tasks
awasyn and others added 3 commits October 11, 2024 00:44
- add back importFrom n_distinct() as it appears to be used by summarizeGenContext()
- use function call as title -- may specify this in MolEvolvR style guide for consistency
- adjust Rd grouping with MolEvolvR_summary @Rdname tag for functions that had a clear summary element. This will hopefully avoid confusion with the rather ubiquitous dplyr::summarize
- converted some code comments to placeholder descriptions
@@ -10,7 +10,7 @@
# suppressPackageStartupMessages(library(rlang))
# conflicted::conflict_prefer("filter", "dplyr")

#' Filter by Domains
#' filterByDomains
Copy link
Collaborator

Choose a reason for hiding this comment

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

for consistency, modified the titles of function documentation to the function call.

Comment on lines +281 to +288
#' MolEvolvR Summary
#' @name MolEvolvR_summary
#' @description
#' A collection of summary functions for the MolEvolvR package.
#'
NULL

#' summarizeByLineage
Copy link
Collaborator

Choose a reason for hiding this comment

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

Created a MolEvolvR_summary Rd block

#' @return A tibble summarizing the counts of occurrences of elements in
#' the `column`, grouped by the `by` column. The result includes the number
#' of occurrences (`count`) and is arranged in descending order of count.
#' @rdname MolEvolvR_summary
Copy link
Collaborator

Choose a reason for hiding this comment

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

Grouped summary functions under MolEvolvR_summary with @Rdname

Copy link
Collaborator

@the-mayer the-mayer left a comment

Choose a reason for hiding this comment

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

Thanks @awasyn ! Great work on adding descriptions to the parameters and returns for these functions! I made a few changes, mostly to the way the Rd files are grouped within summarize.R. I used @Rdname, instead of @name and grouped the summary functions under a common heading MolEvolvR_summary -- credit to you for recognizing the similar functionality!

Additionally, I made some minor stylistic adjustments, which we may wish to apply to other function documentation. Will tag in future issues.

Merging shortly!

@the-mayer the-mayer merged commit 4d58e59 into JRaviLab:main Oct 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation, incl. R docstring/roxygen2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants