-
Notifications
You must be signed in to change notification settings - Fork 327
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
Support results = 'hide'
directly in python engine
#1599
Comments
Thanks, I agree reticulate should support What is the relation or difference between |
Anyhow, I don't think reticulate needs to handle include, but it needs to handle results. I'll send a PR. |
Reported in
and full example at
Problem
Currently,
results = 'hide'
does not seem to be handled by reticulate's knitr engine. Example:The results will still be shown. This is a minimal example - see posit-dev/great-tables#291 for one with great_tables
Context
This is because
_repr_html_
is catched to be returned as aknitr::raw_html()
reticulate/R/knitr-engine.R
Lines 744 to 750 in d4e752b
and provided in the
out
component on whichknitr:::sew()
will applyreticulate/R/knitr-engine.R
Lines 626 to 628 in d4e752b
By returning
engine_output(out = )
, knitr's assumes the output is already filtered with what should be filtered.Otherwise, it will be handled directly
engine_output()
default usagehttps://github.com/yihui/knitr/blob/ba8d9fb0ecd60f3f9ebec58fdde1e689bdc40ad3/R/engine.R#L96-L98
So I do think reticulate needs to support
results = 'hide'
and not provide outputs in the list when the option is provided.I can make a PR - just need to think about the best place to do this.
The text was updated successfully, but these errors were encountered: