Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facilitating meta-modules #176

Open
goldingn opened this issue Sep 21, 2015 · 3 comments
Open

Facilitating meta-modules #176

goldingn opened this issue Sep 21, 2015 · 3 comments

Comments

@goldingn
Copy link
Member

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?

@AugustT
Copy link
Member

AugustT commented Sep 29, 2015

@goldingn I don't follow the purpose of this? can you give a laymen example?

@AugustT
Copy link
Member

AugustT commented Sep 29, 2015

Dont worry I see what you mean from the scrubr module suggestion.

@goldingn
Copy link
Member Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants