Declare studyArea as an input - #16
Merged
Merged
Conversation
.inputObjects masks the fire polygons, land cover and stand age it makes to sim$studyArea, but an undeclared object is not visible there, so it was always NULL and nothing was masked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv
It stood in for studyArea because studyArea was undeclared and so NULL in .inputObjects. Now that it is declared, an unset .studyAreaName is a hash of studyArea, or stays NA without one. resolveStudyAreaName() moves below .inputObjects so the roxygen block attaches to .inputObjects again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv
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.
.inputObjectsmasks the fire polygons, land cover and stand age it makes tosim$studyArea(maskTo/studyAreaat lines 261, 617, 631), butstudyAreawas never declared withexpectsInput(). An undeclared object is not visible in.inputObjects, so it was alwaysNULLand nothing was masked. This declares it.It also removes the workaround #15 added for the same cause: when
studyAreawas missing,resolveStudyAreaName()hashed the extent ofrasterToMatchinstead, so.inputObjectsandInitnamed the same study area differently. Now an unset.studyAreaNameis a hash ofstudyArea, or staysNAwithout one (the default is under discussion in PredictiveEcology/LandR#246). The function moves below.inputObjectsso its roxygen block attaches to.inputObjectsagain.Tests: the metadata test and the new "stays NA" test fail on development and pass here; full suite 49 pass, 0 fail. Version 1.0.4.9003.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv