Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds a new vignette for the cadence R package that demonstrates how to use the summarize_cadence() function to compute cadence metrics from step count data. The vignette includes examples using the simulated_nhanes_steps dataset and documents the various output columns produced by the function.
Changes:
- Added
calculate_cadence.Rmdvignette with documentation and examples for cadence calculation - Added
.gitignorefile to the vignettes directory to exclude generated HTML and R files
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| vignettes/calculate_cadence.Rmd | New vignette documenting the summarize_cadence() function with data examples and column descriptions |
| vignettes/.gitignore | Gitignore configuration to exclude generated vignette output files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - `mean_censored_cadence`: Mean cadence with censoring based on counts. | ||
| - `peak_1min`: Peak 1-minute cadence. | ||
| - `peak_30min`: Peak 30-minute cadence. | ||
| - `peak_60min`: Peak 30-minute cadence. |
There was a problem hiding this comment.
The description for peak_60min incorrectly states "Peak 30-minute cadence" but should state "Peak 60-minute cadence".
| - `peak_60min`: Peak 30-minute cadence. | |
| - `peak_60min`: Peak 60-minute cadence. |
| - `n_minutes`: Number of total minutes. | ||
| - `n_minutes_wear`: Number of minutes with wear time. | ||
| - `max_5min` : Maximum 5-minute cadence. | ||
| - `max_10min`: Maximum 10-minute cadence. |
There was a problem hiding this comment.
The max_10min column is documented here but is not actually produced by the summarize_cadence() function. According to the source code in compute_cadence_max, only max_5min, max_20min, max_30min, and max_60min are computed. This line should be removed from the documentation.
| - `max_10min`: Maximum 10-minute cadence. |
| - `brisk_walk`: Time spent in brisk walking cadence band. | ||
| - `fast_walk`: Time spent in fast walking cadence band: 90-99 steps/min. | ||
| - `very_fast_walk`: Time spent in very fast walking cadence band: 100-119 steps/min. | ||
| - `all_out`: Time spent in all-out cadence band: 119+ steps/min. |
There was a problem hiding this comment.
The range description for all_out is slightly inaccurate. According to the source code, the cadence band uses breaks with (119, Inf], meaning values strictly greater than 119. For integer step counts, this would be 120+ steps/min, not 119+ as documented. Consider updating to "120+ steps/min" or ">119 steps/min" for accuracy.
| - `all_out`: Time spent in all-out cadence band: 119+ steps/min. | |
| - `all_out`: Time spent in all-out cadence band: 120+ steps/min. |
Need to integrate this after we check the cadence bands.