Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 LyX 中输入以下代码:
<<>>= data$y <- data$x @
此代码出错,因为“$$”使其中的内容被解释为数学公式。无论如何要解决这个问题吗?
将代码放入 TeX 框中。为此,突出显示所有文本并转到插入 > TeX 代码(默认快捷键是 ctrl + l)。
如果您碰巧使用的是 LyX 2.1 beta,请转到帮助 > 特定手册 > knitr 以查看示例。
不要忘记您必须加载模块。为此,请转到文档 > 设置 > 模块