Output format in engines Python / Octave, result options

31 views
Skip to first unread message

JJdasWIESEL

unread,
Oct 26, 2017, 8:04:15 AM10/26/17
to knitr
Hi,

using knitr with engines python or octave it seems like the output is formatted like the option results='hold' is set. Does anyone know what the reason is for this and is there a way to obtain an output like when the engine is R, i.e. display every output right after the command? (see attached pdf)

Thanks in advance!

JJ

result_option.pdf

Yihui Xie

unread,
Oct 26, 2017, 9:28:23 AM10/26/17
to JJdasWIESEL, knitr
Because for R code chunks, I can parse the code into individual
expressions and evaluate them one by one; for non-R code chunks, I
don't have language parsers, and can only evaluate the whole chunk and
get all output.

For Python, please see
https://github.com/yihui/knitr/issues/1440#issuecomment-338675147 In
the near future, you will be able to run python code just like R (each
expression returns its result immediately). For Octave, this won't
happen unless someone wants to make a substantial contribution like
the reticulate package and
https://github.com/rstudio/reticulate/pull/107.

Regards,
Yihui
--
https://yihui.name
> --
> You received this message because you are subscribed to the Google Groups "knitr" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to knitr+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages