Refactor package structure and enhance spirometry analysis files#1
Refactor package structure and enhance spirometry analysis files#1ehrlinger wants to merge 8 commits into
Conversation
…ive tests for core functionalities
- Created new RData files for spirometry print and split analyses. - Added corresponding RDB and RDX files for both print and split analyses. - Introduced a new RData file for variable importance analysis (vimp) with associated RDB and RDX files.
…rade upload-artifact action to v5
…itudinal analysis vignettes - Deleted various binary files related to caching in the introduction_cache and longitudinal-analysis_cache directories. - Removed package reference for 'boostmtree' from both vignettes.
…n and test coverage configurations, and include quarto support
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
…ons to 20; enhance error messaging in functions; adjust vignettes and examples for consistency with new parameters.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 53 out of 54 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| 2. `predict.boostmtree` - Used for prediction. Predicted values are obtained by dropping the user supplied test data down the grow forest. The resulting object has class (`rfsrc`, `predict`). | ||
| fit_af <- boostmtree( | ||
| x = AF$features, |
There was a problem hiding this comment.
The AF dataset is referenced elsewhere in the repo as AF$feature (singular) (e.g., inst/extdata/precompute.R, vignettes/longitudinal-analysis.qmd, and examples in R/boostmtree.R). Using AF$features here will likely error for users running the README example. Please align the element name with the actual dataset structure.
| x = AF$features, | |
| x = AF$feature, |
| - name: Upload lint results | ||
| if: failure() | ||
| uses: actions/upload-artifact@v5 | ||
| with: | ||
| name: lint-results | ||
| path: lintr_results.json |
There was a problem hiding this comment.
lintr::lint_package() doesn’t create lintr_results.json by default, so this artifact upload step will likely fail (or upload nothing) when the job fails. Either write the lint output to a file explicitly (e.g., via lintr::sarif_output() / lintr::json_output()), or set if-no-files-found: ignore / upload an existing output format.
| cat("Training subjects:", sum(trn_idx), "\n") | ||
| cat("Test subjects: ", sum(!trn_idx), "\n") |
There was a problem hiding this comment.
In the train/test split, trn_idx is a per-observation logical, so sum(trn_idx) / sum(!trn_idx) reports number of rows (observations), not number of subjects. If you want subject counts, compute them from spirometry$id (e.g., length(unique(spirometry$id[trn_idx]))).
| cat("Training subjects:", sum(trn_af), "\n") | ||
| cat("Test subjects: ", sum(!trn_af), "\n") |
There was a problem hiding this comment.
Same issue as above: trn_af is a per-observation logical vector, so sum(trn_af) / sum(!trn_af) prints observation counts while the label says “subjects”. Consider counting unique IDs instead (e.g., length(unique(AF$id[trn_af]))).
This pull request introduces a major update to the
boostmtreepackage, marking the transition to version 2.0.0.9000. The update modernizes the package's infrastructure, improves documentation, enhances CI/CD workflows, and introduces new features and breaking changes. The most important changes are summarized below.Breaking Changes and Maintenance:
Documentation and User Guidance:
NEWS.mdfor pkgdown changelog rendering. Two new vignettes added for user guidance.Continuous Integration and Workflow Improvements:
Package Structure and Imports:
ggRandomForests,hvtiPlotR,hvtiRutilities, and others.Miscellaneous:
.Rbuildignoreexpanded to ignore additional development and cache files for cleaner package builds.These changes collectively modernize the package, improve its usability, and align it with current R package development best practices.