You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You'll see that the printed output (hello) is not captured and reflected in the generated Markdown document.
I think the issue here is that knitr attempts to capture R output with a sink(); however, because we don't always install redirects for Python output back to R, that output is lost. See e.g.:
The fix here would likely be to ensure that the output streams are remapped when we're running reticulate within knitr -- or perhaps we should just always unconditionally remap the output streams.
To reproduce, try rendering the following document (repro'ed with macOS 10.13.6 + R 3.5.1):
You'll see that the printed output (
hello
) is not captured and reflected in the generated Markdown document.I think the issue here is that
knitr
attempts to capture R output with asink()
; however, because we don't always install redirects for Python output back to R, that output is lost. See e.g.:reticulate/R/output.R
Lines 3 to 11 in 82b2eb8
The fix here would likely be to ensure that the output streams are remapped when we're running
reticulate
withinknitr
-- or perhaps we should just always unconditionally remap the output streams.See also: rstudio/rstudio#3271
The text was updated successfully, but these errors were encountered: