Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
knitr should interact better with `system` (R) #1203
As highlighted by this question, we sort of have to jump through hoops to get the output from a
Consider the following simple .Rmd file:
The output of which is simply:
We can force the output to show up by hiding things from viewers:
Which produces the output one would expect from simply running the first chunk.
But this seems like a sub-optimal solution and I think runs antithetical to the spirit of
I'm not 100% sure this is a
My instincts tell me that's a terrible idea, but worth a suggestion.
You can install the development version of evaluate via
Then you can use this hack:
evaluate::inject_funs( system = function(...) cat(base::system(..., intern = TRUE), sep = "\n") )
and knitr will be able to capture the output of