You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the lazyeval package is used for NSE in filter_samples.FacileDataSet. It's a poor implementation, and we can do better.
I think we can simplify the API by:
dropping the filter_samples() function and make a more facile-specific filter functionIt feels like we can; and
Maybe even making a more facile select() which can complement (or even replace?) with_sample_covariates()
filter_samples() and filter()
Currently, the filter_samples() function takes a FacileDataStore, or facile_frame, and enables the use of any of the "sample_covariates" in the FacileDataStore that are defined over the current active set of samples to appear in the LHS of the filter criteria.
Given a facile_frame of samples, we can use with_sample_covariates() to widen it with covariates over these samples that haven't been extracted and materialized from the FacileDataStore.
In the same spirit as above, wouldn't it make sense to rather allow users to use the same not-yet-materialized covariates of a facile_frame in a select() call?
Continuing from the example above, if you wanted to extract the CRC indication samples and then fatten this facile_frame with "sex" and "state" covariates, currently we would do:
But just how filter_samples can pull sample-covariates implicitly out of the FacileDataStore, shouldn't select() be able to do the same? That would look like:
But what would the ... be to indicate we want all of the covariates (columns) that are currently in the facile_frame plus sex and stage which need to be pulled out of the FacileDataStore?
The text was updated successfully, but these errors were encountered:
lianos
changed the title
Tackle NSE with rlang/tidyeval
filter_samples should be samples(fds) %>% filter(...) -- needs super NSE w/ rlang
Sep 9, 2019
lianos
changed the title
filter_samples should be samples(fds) %>% filter(...) -- needs super NSE w/ rlang
More dplyr-like filter_samples -> samples(fds) %>% filter(...)?
Sep 24, 2019
Currently the lazyeval package is used for NSE in
filter_samples.FacileDataSet
. It's a poor implementation, and we can do better.I think we can simplify the API by:
filter_samples()
function and make a more facile-specific filter functionIt feels like we can; andselect()
which can complement (or even replace?)with_sample_covariates()
filter_samples() and filter()
Currently, the
filter_samples()
function takes aFacileDataStore
, orfacile_frame
, and enables the use of any of the "sample_covariates" in the FacileDataStore that are defined over the current active set of samples to appear in the LHS of the filter criteria.For instance, currently we can do:
But I think forcing the user to be a bit more explicit simplifies things over all, so am in favor of doing this instead:
select() and with_sample_covariates()
Given a
facile_frame
of samples, we can usewith_sample_covariates()
to widen it with covariates over these samples that haven't been extracted and materialized from the FacileDataStore.In the same spirit as above, wouldn't it make sense to rather allow users to use the same not-yet-materialized covariates of a facile_frame in a
select()
call?Continuing from the example above, if you wanted to extract the CRC indication samples and then fatten this
facile_frame
with"sex"
and"state"
covariates, currently we would do:But just how
filter_samples
can pull sample-covariates implicitly out of the FacileDataStore, shouldn'tselect()
be able to do the same? That would look like:But what would the
...
be to indicate we want all of the covariates (columns) that are currently in thefacile_frame
plussex
andstage
which need to be pulled out of the FacileDataStore?Maybe
and then retrieving all the defined covariates currently looks like this:
But should it look like:
Final New API
So taken together, to get the CRC samples out of the FacileDataStore and decorating with sex and stage covariates would look like:
... maybe ...
The text was updated successfully, but these errors were encountered: