Better alignment of agent$validation_step
to rows of get_agent_report(agent)
#565
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.
This is a small surgery on a single line of
get_agent_report()
:pointblank/R/get_agent_report.R
Line 451 in 5a00f4b
The PR just makes the logic of matching rows between
validation_set
andreport_tbl
more explicit, viafilter()
on the matchingi
columns (where agents always have the invariant ofall(diff(agent$validation_set$i) == 1)
).This resolves a cryptic error you get when you remove rows from the
agent$validation_set
for the purposes ofget_agent_report()
(ref: #563). Now, we get a better alignment of "rows in$validation_set
" and "rows that appear in the{gt}
agent report". I'm taking caution to not advertise this as public API (IMO getting the "hide rows" features in{gt}
will serve as a better interface to this, when that's implemented). For the time being, the PR simply addresses some confusion about why removing rows in$validation_set
does not produce the same effect forget_agent_report()
(with an added benefit of making the intent behind the code for this line more explicit).Using reprex from #563 (hide inactive columns), this now works: