There's a very handy Chunk environment for sweave / knitr code. But is there any support for inline knitr in LyX? I'm thinking of, e.g.,
As our experiments showed, the sum of 1 and 1 equals \Sexpr{1 + 1}.This works if \Sexpr{1 + 1} is placed in an ERT span, but, unlike Chunk, that's not a semantic document structure.