zoon
zoon copied to clipboard
Facilitating meta-modules
Enabling module developers to create modules which combine other modules in a Chain
would make it possible to compare different procedures (by listing different meta modules), to share sections of complete analyses, and should be fairly easy to implement.
At present module devs could always do:
MyMetaModule <- function(x, y)
LoadModule(a)
LoadModule(b)
LoadModule(c)
ans <- a(x, y)
ans <- b(ans$x, ans$y, someoptions = 'blah')
ans <- c(ans$x, ans$y)
return (ans)
}
but that's ugly and would dump stuff to the global environment (unless we implemented child processes as in #84). A neater (and more consistent with the workflow interface) syntax would be something like:
MyMetaModule <- function(.x, .y)
Chain(a(.x, .y),
b(.x, .y, someoptions = 'blah'),
c(.x, .y))
}
Although we'd have to hack Chain
to run these sequentially.
What do you think of this approach and interface?
@goldingn I don't follow the purpose of this? can you give a laymen example?
Dont worry I see what you mean from the scrubr module suggestion.
:+1: