Capture R console as an image

Is there a way to capture console output as an image?

I am playing around with the Crayon package to create informative text output in the console. It would be useful to be able to automatically capture and save the console output as an image like a screenshot would.

I thought that since RMarkdown documents do this when rendering in HTML or PDF there must be a way to capture the image without it being integrated into a RMarkdown document. If not, is there a way to capture just the HTML for the code chunk in a RMarkdown document and then render and capture that as an image using something like PhantomJS?

Example console output:

Example of RMarkdown capturing console output:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.