yihui/knitr — pull request #789 by fhirschmann (2014-06-07 11:37:24+00:00)
Title: Redirect an engine's stderr to its stdout

This replaces the `system` call with a `system2` call, which allows the standard error to be redirected to the `out` variable in `engines.R`. Hence, the new behavior is to merge stdout and stderr, i.e.

```python
from random import choice

print(choice([1, 2, 3, 4]))
print(choice2([1, 2, 3, 4]))
```

```
## 4
## Traceback (most recent call last):
## File "", line 5, in
## NameError: name 'choice2' is not defined
```

Up to now, knitr's default behavior on errors was to not include any error messages. This behavior can still be realized by using the new `engine.stderr = FALSE` code chunk option.