-
Notifications
You must be signed in to change notification settings - Fork 13
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
Giving path as object broken #42
Comments
add a 'local' function? e.g. occurrence = Local('path/to/file.R'), ... On Fri, Oct 3, 2014 at 11:32 AM, Tim Lucas notifications@github.com wrote:
Nick Golding nick.golding@zoo.ox.ac.uk |
Hrmm, in retrospect might be tricky to combine this with passing arguments. Another option is to abandon passing a path, but instead allow user-defined i.e.: GetModule('path/to/occmod.R') w1 <- workflow(occurrence = occmod(arg = 'somearg'), ...) On Fri, Oct 3, 2014 at 11:57 AM, Nick Golding nick.golding@zoo.ox.ac.uk
Nick Golding nick.golding@zoo.ox.ac.uk |
Ah I hadn't thought about passing arguments with paths at all. Make it all more tricky. We had planned to do global env modules. That might be best. Does break the 1 line of code thing though. |
Ah I've gotten confused. workflow(occurence = '~/MyMod.R', ... Saving the path as an object doesn't work. |
From watching Bob and others at the workshop, I think the globally-visible That said you need a way of testing local on-disk modules too; so perhaps w1 <- workflow(occurrence = occmod(arg = 'somearg'), (where occmod isn't on the main zoon repo) This may be tricky with naming conflicts if you want some modules from the w1 <- workflow(occurrence = occmod(arg = 'somearg'), with the default being the main repo... This would also allow users to clone the entirety of the main repo (or at On Fri, Oct 3, 2014 at 2:01 PM, Tim Lucas notifications@github.com wrote:
Nick Golding nick.golding@zoo.ox.ac.uk |
I'm still thinking about all this. Just to clarify things, here's a list of where we might want want to get modules from: An object in the R workspace That seems a vaguely sensible order of priority as well. This way, if someone has run GetModules() in the global environment, workflow will find the modules in the global environment and not have to go to the repo. I'm still thinking through this and it's not directly what I'm working. So just to keep all the info in one place, here is a couple of other musings.
workflow('~/mylocalModules.R'(para1 = 1, para2 = 'Milvus milvus'), |
I downvote the last option (paths as operators) as I think it will Order of priority sounds OK. Another option for saving on downloads is a local library of modules, as
|
As discussed in #44 we are not accepting paths in workflow. Instead use LoadModule() |
The substitute stuff to make the syntax nicer has broken the ability to give a module path as an object e.g.
path <- '~/MyMod.R'
w <- workflow(path, ....)
now doesn't work because substitute reads this as 'path' not '~\MyMod.R'.
The text was updated successfully, but these errors were encountered: