This seems like a reasonable problem, but it does not happen to me (with R-devel / 3.1.0, knitr 1.5). In addition, it logically seems that this should not happen, since the contents of the code fragments are evaluated before LaTeX sees the file. Reproduction example please?
(As shown below, you may encounter difficulties if you try hard enough, but as a rule, I think you should not do this.)
If texmult.Rnw:
\documentclass{article}
\pagestyle{empty}
\begin{document}
hello
<<>>=
m <- matrix(1:4,nrow=1)
x <- 1:4
@
The result is \Sexpr{m %*% x}
This is a bad thing: \Sexpr{"%*%"} and then more stuff
\end{document}
library(knitr); knit2pdf("texmult.Rnw")
