{"action":"created","issue":{"url":"https://api.github.com/repos/zoonproject/zoon/issues/104","labels_url":"https://api.github.com/repos/zoonproject/zoon/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/zoonproject/zoon/issues/104/comments","events_url":"https://api.github.com/repos/zoonproject/zoon/issues/104/events","html_url":"https://github.com/zoonproject/zoon/issues/104","id":104502416,"number":104,"title":"tmpZoonWorkflow changes global workspace (for CRAN sub)","user":{"login":"timcdlucas","id":3583796,"avatar_url":"https://avatars.githubusercontent.com/u/3583796?v=3","gravatar_id":"","url":"https://api.github.com/users/timcdlucas","html_url":"https://github.com/timcdlucas","followers_url":"https://api.github.com/users/timcdlucas/followers","following_url":"https://api.github.com/users/timcdlucas/following{/other_user}","gists_url":"https://api.github.com/users/timcdlucas/gists{/gist_id}","starred_url":"https://api.github.com/users/timcdlucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timcdlucas/subscriptions","organizations_url":"https://api.github.com/users/timcdlucas/orgs","repos_url":"https://api.github.com/users/timcdlucas/repos","events_url":"https://api.github.com/users/timcdlucas/events{/privacy}","received_events_url":"https://api.github.com/users/timcdlucas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zoonproject/zoon/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/zoonproject/zoon/milestones/2","html_url":"https://github.com/zoonproject/zoon/milestones/CRAN","labels_url":"https://api.github.com/repos/zoonproject/zoon/milestones/2/labels","id":1286549,"number":2,"title":"CRAN","description":null,"creator":{"login":"timcdlucas","id":3583796,"avatar_url":"https://avatars.githubusercontent.com/u/3583796?v=3","gravatar_id":"","url":"https://api.github.com/users/timcdlucas","html_url":"https://github.com/timcdlucas","followers_url":"https://api.github.com/users/timcdlucas/followers","following_url":"https://api.github.com/users/timcdlucas/following{/other_user}","gists_url":"https://api.github.com/users/timcdlucas/gists{/gist_id}","starred_url":"https://api.github.com/users/timcdlucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timcdlucas/subscriptions","organizations_url":"https://api.github.com/users/timcdlucas/orgs","repos_url":"https://api.github.com/users/timcdlucas/repos","events_url":"https://api.github.com/users/timcdlucas/events{/privacy}","received_events_url":"https://api.github.com/users/timcdlucas/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2015-09-02T15:13:25Z","updated_at":"2015-09-02T15:13:25Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-09-02T15:08:38Z","updated_at":"2015-09-02T15:37:05Z","closed_at":null,"body":"- Packages should not modify the global environment (user’s workspace).\r\nhttps://cran.r-project.org/web/packages/policies.html\r\n\r\nI struggled to think of good places to save a workflow on a crash when I wrote this. But didn't know this was disallowed. "},"comment":{"url":"https://api.github.com/repos/zoonproject/zoon/issues/comments/137136442","html_url":"https://github.com/zoonproject/zoon/issues/104#issuecomment-137136442","issue_url":"https://api.github.com/repos/zoonproject/zoon/issues/104","id":137136442,"user":{"login":"timcdlucas","id":3583796,"avatar_url":"https://avatars.githubusercontent.com/u/3583796?v=3","gravatar_id":"","url":"https://api.github.com/users/timcdlucas","html_url":"https://github.com/timcdlucas","followers_url":"https://api.github.com/users/timcdlucas/followers","following_url":"https://api.github.com/users/timcdlucas/following{/other_user}","gists_url":"https://api.github.com/users/timcdlucas/gists{/gist_id}","starred_url":"https://api.github.com/users/timcdlucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timcdlucas/subscriptions","organizations_url":"https://api.github.com/users/timcdlucas/orgs","repos_url":"https://api.github.com/users/timcdlucas/repos","events_url":"https://api.github.com/users/timcdlucas/events{/privacy}","received_events_url":"https://api.github.com/users/timcdlucas/received_events","type":"User","site_admin":false},"created_at":"2015-09-02T15:37:05Z","updated_at":"2015-09-02T15:37:05Z","body":"I couldn't work out how. \r\n\r\nThe problem was to have a proper `stop()` call (if people are using workflows inside other functions, we want to fully error out) and return an object from the function.\r\n\r\nIf the call is w <- workflow()\r\n\r\nYou can't do\r\n\r\n    assign('w', tmpWorkflow, envir = .GlobalEnv)\r\n    stop('workflow broke')\r\n\r\nbecause a function doesn't know where it is assigning its output to.\r\n\r\nYou can't do\r\n\r\n    return(tmpWorkflow)\r\n    stop('workflow broke')\r\n\r\nBecause the `return()` prevents the `stop` being run.\r\n\r\n"}}