Skip to content

Conversation

@muschellij2
Copy link
Contributor

Need to integrate this after we check the cadence bands.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.Rmd vignette with documentation and examples for cadence calculation
  • Added .gitignore file 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.
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

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

The description for peak_60min incorrectly states "Peak 30-minute cadence" but should state "Peak 60-minute cadence".

Suggested change
- `peak_60min`: Peak 30-minute cadence.
- `peak_60min`: Peak 60-minute cadence.

Copilot uses AI. Check for mistakes.
- `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.
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
- `max_10min`: Maximum 10-minute cadence.

Copilot uses AI. Check for mistakes.
- `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.
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
- `all_out`: Time spent in all-out cadence band: 119+ steps/min.
- `all_out`: Time spent in all-out cadence band: 120+ steps/min.

Copilot uses AI. Check for mistakes.
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.

1 participant