Add model_out_tbl subsetting functions #202
Merged
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 PR resolves #149 by
subset_task_id_names()
function to subset task ID names from a character vector of column names.subset_task_id_cols()
andsubset_std_cols()
to subset amodel_out_tbl
or submissiontbl
to task ID or standard (non-task ID) columns respectively.Note I used a different function name to that proposed in #149 as I feel it's more descriptive and also to avoid any confusion with functions like
get_task_id_names()
which fetches task ID names from a config file. In general mostget_*()
functions act on config files so I'd prefer to stick with that convention if that's ok.I've also made it so that we can also use them on submitted
tbl
objects which lack themodel_id
column as they can also be useful inhubValidations
Also, note that the check to ensure that the input contains all task ID columns is not implemented in this function. That would require checking against the config which would require more inputs. To keep these functions lightweight, I leave that check to be performed in higher level functions that call the
subset_*_cols()
functions.