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

How to redirect callr output while calling from future #3

Closed
001ben opened this issue Feb 23, 2018 · 3 comments
Closed

How to redirect callr output while calling from future #3

001ben opened this issue Feb 23, 2018 · 3 comments

Comments

@001ben
Copy link

001ben commented Feb 23, 2018

I'm wondering if it's possible to pass an argument down to the underlying callr::r method when using the futures API.

Specifically, i want to make use of the callr::r(show = TRUE) argument, however i can't see any reference in the documentation to pass the parameter down.

P.S. the future-verse is amazing

@HenrikBengtsson
Copy link
Collaborator

Hi, sorry for the late reply.

This feature request falls under the section of a "Extended/Optional Future API" discussed in futureverse/future#172. The same wish for viewing output of parallel workers has been raised for other type of backends as well.

The key idea behind the Future API is that your future code (as a developer) should work regardless of which future backend is used (set by the user via plan().) Because of this, it is important that future backends (such as future.callr) do not provide their own extensions/back doors to whatever underlying framework they're building upon. In other words, what you're asking for needs to be defined via the Future API that the future package defines. Exactly how these type of extended/optional features will be declared/provided is still to be decided, but it is on the road map.

The capturing of standard output (stdout) produced by a future is one of the first things that will be supported (hopefully already by one of the near future 'future' releases). This will most likely not involve displaying output live, but rather displaying / making the output available when the future has resolved. So, in the near term it will still not be possible to follow future evaluation live via output or progress bars. Please feel free to continue this discussion over at futureverse/future#172 - any feedback and use cases will help identify what's needed.

@HenrikBengtsson
Copy link
Collaborator

... and thanks for the kind words :)

@001ben
Copy link
Author

001ben commented Apr 25, 2018

Thanks for the reply, looking forward to extended future options :D

@001ben 001ben closed this as completed Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants