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.
我现在正在研究 Sweave,当我想使用 R 代码来描述乳胶表中的一个变量时。
原来Sweave无法读取这些R代码,输出的不是变量,而是我写的所有代码的文本形式
你可能想要\Sexpr{R expression};例如,这个 Sweave 片段
\Sexpr{R expression}
<<echo=FALSE>>= z <- exp(pi) @ \begin{tabular}{cc} a & \Sexpr{z} \\ b & \Sexpr{round(z,3)} \\ \end{tabular}
编织时变成这个(编织?)
\begin{tabular}{cc} a & 23.1406926327793 \\ b & 23.141 \\ \end{tabular}