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

Feature Request: Stream knitr progress to function for processing #1321

Closed
nathanwebb opened this issue Nov 20, 2016 · 4 comments
Closed

Feature Request: Stream knitr progress to function for processing #1321

nathanwebb opened this issue Nov 20, 2016 · 4 comments
Labels
feature Feature requests

Comments

@nathanwebb
Copy link

nathanwebb commented Nov 20, 2016

I would like to convert the knitr progress messages into a progress bar, which I think that means that I need to parse the output and extract just the percentages. Another possibility would be to include a hook that can be called whenever the progress is updated.

Is there a way to capture the progress of knitr and process it in a function in realtime? The function would then parse each segment of text and extract the percentage.

AFAIK the output is being sent to stdout, so there is a way that the output can be capture, either using sink() or captureOutput() to a connection. Can that connection then be sent to a function to be processed in realtime?

SO post at http://stackoverflow.com/q/40699822/559676

@bguiastr
Copy link

bguiastr commented Dec 5, 2016

This would also be a great addition for the withProgress() function in shiny apps used to generate reports with knitr.

@cderv
Copy link
Collaborator

cderv commented Jan 20, 2021

Related to #1880

@yihui
Copy link
Owner

yihui commented Nov 24, 2022

I guess this is possible now with the dev version of knitr: https://github.com/yihui/knitr/blob/master/NEWS.md#changes-in-knitr-version-142

@yihui yihui closed this as completed Aug 30, 2023
Copy link

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Feature requests
Projects
None yet
Development

No branches or pull requests

4 participants