Draft
Conversation
This was referenced Mar 9, 2026
3 tasks
averissimo
reviewed
Mar 13, 2026
Comment on lines
+68
to
+81
| term_var = teal.picks::picks( | ||
| teal.picks::datasets(), | ||
| teal.picks::variables( | ||
| choices = teal.picks::is_categorical(min.len = 2), | ||
| selected = 1L | ||
| ) | ||
| ), | ||
| arm_var = teal.picks::picks( | ||
| teal.picks::datasets(), | ||
| teal.picks::variables( | ||
| choices = teal.picks::is_categorical(min.len = 2), | ||
| selected = 1L | ||
| ) | ||
| ), |
Contributor
There was a problem hiding this comment.
I think this is a good candidate to use variables() in the arguments, instead of picks
Suggested change
| term_var = teal.picks::picks( | |
| teal.picks::datasets(), | |
| teal.picks::variables( | |
| choices = teal.picks::is_categorical(min.len = 2), | |
| selected = 1L | |
| ) | |
| ), | |
| arm_var = teal.picks::picks( | |
| teal.picks::datasets(), | |
| teal.picks::variables( | |
| choices = teal.picks::is_categorical(min.len = 2), | |
| selected = 1L | |
| ) | |
| ), | |
| term_var = teal.picks::variables( | |
| choices = teal.picks::is_categorical(min.len = 2), | |
| selected = 1L | |
| ), | |
| arm_var = teal.picks::variables( | |
| choices = teal.picks::is_categorical(min.len = 2), | |
| selected = 1L | |
| ), |
And then generate the actual picks on body
term_var <- picks::picks(teal.picks::datasets(dataname), term_var)
arm_var <- picks::picks(teal.picks::datasets(dataname), arm_var)
Contributor
There was a problem hiding this comment.
Why not make that transparent to the user?
term_var = teal.picks::picks(datasets(dataname), variables(....),
arm_var = teal.picks::picks(datasets(dataname), variables(....),
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.
Based on
and a new package
Changes
Refactored
tm_g_events_term_idto support the newpicksinterface fromteal.picks, following the same S3 dispatch pattern established inteal.modules.generalPR #942 (based ontm_g_response).tm_g_events_term_id.Rtm_g_events_term_id()into an S3 generic dispatching onterm_vartm_g_events_term_id.default()tm_g_events_term_id_picks.R(new)tm_g_events_term_id.picks()method usingteal.picks::picks()forterm_varandarm_varteal.picks::picks_ui()/picks_srv()for variable selection UIteal.picks::merge_srv()for dataset merging with automatic join key handling.picks_datanames()helper for resolvingdatanamesfrom picks objectsDESCRIPTIONteal.picks (>= 0.1.0)toImportsinsightsengineering/teal.pickstoRemotesTested with this code
Default to teal.transform
Picks method
TODO