-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
This refers to indexing as in lambda.r#L14-L19 (multiple arrays, multiple axes, index as data.frame).
Idea:
- This could be provided as a separate function (analogous to
group) - The index could be filtered (e.g. to iterate 2 arrays together instead of every combination)
lambdacould take an index instead of thealongargument
Issues:
- The index wouldn't know necessarily know which axis it was derived from
- could be solved by adding
alongattribute to df - or wrapping the function call to subset indices (as below)
- could be solved by adding
- HPC calls like
clustermq::Q_rowswould not be able to call a function with the indexed object instead of the index of the object- instead of just creating the index we could also create a wrapped function call that does the subsetting (would no longer require
alongattr on df) - or
lambdacould do this if given an index (but how to do custom cmq calls then?) - wouldn't this be essentially exporting the
wrapperfunction inlambda?
- instead of just creating the index we could also create a wrapped function call that does the subsetting (would no longer require
Proposed solution:
- Provide indexing function that returns both the index and a function that wraps the call around the index (this way it could be processed by e.g.
purrr::pmap,clustermq::Q_rows) lambda/wrappershould work on lists of args instead of row number (so it can be used as a wrapping function and more generalizable for other tools likepurrr)lambda/wrapper:simplifyshouldn't this all be handled by the sameconstructcall?