cd_summary(): name the trend window when a table holds several trend_start - #109
Merged
NewGraphEnvironment merged 4 commits intoSep 30, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GignjoKpZADXywTf6pAMgj
A table from cd_trend(x, trend_start = c(1951, 1981)) gave two rows per variable and period that differed only by Years. cd_summary() now adds a Start column (the requested trend_start) when the table holds more than one, after Period or Trend on, mirroring the conditional Trend on column (#98). Single-window tables keep their shape. Fixes #106 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GignjoKpZADXywTf6pAMgj
Both vignettes' trend tables now carry Start (#106). The hidden trend-table chunk orders rows by variable, period and start so the 1951 and 1981 rows of each series sit together instead of 59 rows apart. Relates to #106 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GignjoKpZADXywTf6pAMgj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GignjoKpZADXywTf6pAMgj
NewGraphEnvironment
deleted the
106-cd-summary-trends-from-several-trend-sta
branch
September 30, 2026 16:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cd_summary()adds aStartcolumn (the requestedtrend_start) when a trend table holds more than one window, such ascd_trend(x, trend_start = c(1951, 1981)). Rows that previously differed only byYearsnow say which window they are.StartfollowsPeriod, orTrend onwhen present. Like cd_summary(): stations sharing a long_name give indistinguishable rows #98'sTrend on, it appears only when the table needs it, so single-window tables keep their shape.Parameter/Period. They now carryStart, and the hiddentrend-tablechunk orders rows so each 1951/1981 pair sits together.Trend onrule.Related Issues
Test plan
devtools::test(): 410 pass, 0 fail. The new tests failed against main'scd_summary()..rdswith load_all. Header isParameter | Period | Start | Slope | …, 118 rows, 0 duplicates on Parameter/Period/Start.planning/archive/2026-09-issue-106-summary-trend-start/review-round*.md).Notes
Startcolumn is conditional, and bound per-region summaries can differ in having it. This is the same caveat asTrend on.pkgdown::check_pkgdown()aborts on main too, because the DESCRIPTION URL lacks the github.io url. This PR does not change that.cd_trend()breakscd_summary()).🤖 Generated with Claude Code
https://claude.ai/code/session_01GignjoKpZADXywTf6pAMgj