Repository navigation
fl_valley_join(): return the owning segment in nearest - #90
Merged
Merged
Conversation
nearest gains seg, the row of segments that owns each cell, after dist. It was computed and dropped; with it a consumer joins any per-segment value (a 0-1 grade, a length) to the cells it owns, where cols carries flags only. any is unchanged. Fixes #89. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KHMvZqDLb3LsF6tCGR13aJ
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
fl_valley_join()'snearestgainsseg: the row ofsegmentsthat owns each cell, placed afterdist. The value was already computed for the flag copy and dropped. With it a consumer joins any per-segment value to the floodplain cells it owns (a 0–1 habitat grade, a length), wherecolscarries logical flags only.any,tiesandcheckare unchanged.Fixes #89. Consumer: knowledge#57 phase 4 (graded floodplain hectares).
Changes
R/fl_valley_join.R:nearest$seg <- o$seg[first]; the return documentation names it.tests/testthat/test-fl_valley_join.R: the threeexpect_namedlines onnearest; a new test thatsegindexes the segment whose flagnearestcopied and that a numeric value joins through it (50 cells at 0.2, 50 at 0.9 on the two-group fixture).NEWS.md: a development-version entry.Test plan
devtools::test(filter = "fl_valley_join"): 0 failures, 123 passesdevtools::document()clean🤖 Generated with Claude Code
https://claude.ai/code/session_01KHMvZqDLb3LsF6tCGR13aJ