Module knitr/Rnw/Sweave: Preview of \Sexpr{}

Stephan Boltzmann stephan2boltzmann at gmail.com
Mon Jul 6 07:48:23 UTC 2026


Hello everybody out there using LyX,

Wrapping a preview around ERTs helps me a lot to quickly orient visually in
my LyX documents.
This would be also very helpful in in dynamic report generation with the
module(s) knitr/Rnw/Sweave, but simply wrapping a preview around the
\Sexpr{1} command doesn't display a preview in my LyX document upon
compilation to PDF (where all my \Sexpr{ } are correctly resolved).

Did anyone manage to get a preview of it?

Technically, it requires evaluation of the code chunks in a document by the
interpreter of the R programming language. An instant preview would
probably be too resource and time consuming, but insertion of results upon
compilation (like for example for TikZ chunks) would be nice.

Best
Stephan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20260706/e8a9cc12/attachment.htm>


More information about the lyx-users mailing list