update - #32
Conversation
Replaces previous wide data with a synthetic cousin dataset for demonstration, ensuring reproducibility and clarity. Adds set.seed for reproducibility, updates data selection and transformation steps, and improves table outputs by specifying digits and captions. Also clarifies regression model equations, improves code chunk organization, and enhances explanations for between-family and discordant-kinship regression sections.
Replaces previous wide data with a synthetic cousin dataset for demonstration, ensuring reproducibility and clarity. Adds set.seed for reproducibility, updates data selection and transformation steps, and improves table outputs by specifying digits and captions. Also clarifies regression model equations, improves code chunk organization, and enhances explanations for between-family and discordant-kinship regression sections.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #32 +/- ##
==========================================
+ Coverage 88.33% 91.16% +2.83%
==========================================
Files 7 7
Lines 840 849 +9
==========================================
+ Hits 742 774 +32
+ Misses 98 75 -23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
Updates the full_data_workflow.Rmd vignette to make the discordant-kinship regression demo reproducible and clearer by switching to a synthetic dataset, improving output formatting, and adding explanatory text and equations.
- Switches analysis to a reproducible synthetic dataset generated via kinsim
- Replaces text outputs with HTML tables via stargazer and adds equations/explanations
- Cleans up table previews and standardizes formatting (digits, captions, slice)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| # CHOOSE ONE based on your path | ||
| # source_wide <- df_wide | ||
| source_wide <- df_long2wide | ||
| # source_wide <- pairs_wide # if you followed the pedigree path | ||
| #source_wide <- df_long2wide | ||
| source_wide <- df_synthetic # if you followed the pedigree path |
There was a problem hiding this comment.
The preceding text states 'Below we default to the long path for reproducibility,' but the code now defaults to df_synthetic. Also, the inline comment 'if you followed the pedigree path' is inaccurate for df_synthetic. Please update the prose and inline comment to reflect the new default and data source (e.g., 'synthetic data generated above').
# This is the 1st commit message: Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Mason Garrison <garrissm@wfu.edu> # This is the commit message #2: Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Mason Garrison <garrissm@wfu.edu>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Mason Garrison <garrissm@wfu.edu> Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Mason Garrison <garrissm@wfu.edu> Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Mason Garrison <garrissm@wfu.edu>
Expanded the introduction with a clearer overview and context for the discordant-kinship regression example.Added a session info section for reproducibility.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| # Session Info | ||
| ```{r} | ||
| sessionInfo() | ||
| sessioninfo::sessionInfo() |
There was a problem hiding this comment.
sessioninfo does not export sessionInfo(); the function is session_info(). Use sessioninfo::session_info() (or utils::sessionInfo() if you intend the base function) to avoid a knit error.
| sessioninfo::sessionInfo() | |
| sessioninfo::session_info() |
Expanded the README with more detailed package description, features, and external reproducible example links. Updated citation information to reflect the current repository URL and removed the year and DOI. Fixed a vignette code example to use sessioninfo::session_info() instead of sessioninfo::sessionInfo().
Renamed 'test-discord_regression_arguments.R' to 'test-discord_regression_estimates.R' to better reflect the contents of the test file.
17d059b to
b4cc3b6
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 24 out of 26 changed files in this pull request and generated 6 comments.
Comments suppressed due to low confidence (1)
man/discord_data.Rd:1
- The documentation sets a default for pair_identifiers (c("_s1","_s2")), but the implementation of discord_data() still requires pair_identifiers as a mandatory argument. Either add the default in the function signature or revert the Rd to reflect that it is required, to avoid confusing users and potential vignette failures if the argument is omitted.
% Generated by roxygen2: do not edit by hand
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Corrects the handling of outcome and predictor variables in the legacy data preparation function to avoid subsetting errors. Adds additional tests to improve coverage of legacy comparison and id handling, as noted in NEWS.md. Bumps package version to 1.3. Add optional id argument for custom kinship pair identifiers Introduces an optional 'id' argument to kinsim() and kinsim_internal() functions, allowing users to specify unique identifiers for each kinship pair. Updates documentation and tests to reflect and validate the new id handling, ensuring backward compatibility with sequential id assignment when not provided.
The README files were updated to provide more detailed descriptions of package features, vignettes, and external reproducible examples. Vignette summaries now include usage guidance and context for each example. Minor formatting improvements and clarifications were made throughout to enhance readability and user understanding.
This pull request updates the
full_data_workflow.Rmdvignette to improve reproducibility, clarity, and output formatting for the demonstration of discordant-kinship regression. The changes include switching to a synthetic dataset for analysis, enhancing table and regression output formatting, and adding explanatory text and equations to better guide users through the workflow.Data workflow and reproducibility improvements:
df_wide) with a new synthetic dataset (df_synthetic) generated from filtered cousin pairs, ensuring full reproducibility and clarity of the workflow. This includes setting a random seed and constructing new variables such as ages and weights for siblings. [1] [2] [3]df_syntheticdataset instead of the original data. [1] [2] [3]Output formatting and presentation:
glimpse()for more informative data previews. [1] [2] [3] [4]stargazerfor all model summaries, improving readability and consistency. [1] [2] [3] [4]Documentation and clarity enhancements:
Minor code and style cleanups:
slice()for table previews and removes commented-out or unused code for improved readability. [1] [2] [3] [4]These changes make the vignette more robust, user-friendly, and easier to follow for those learning or demonstrating discordant-kinship regression.