Search found 1 match

by tormod.boe
Tue Jul 06, 2010 10:08 am
Forum: LyX
Topic: including a Sweave/R code chunk in a LyX table cell
Replies: 3
Views: 3608

including a Sweave/R code chunk in a LyX table cell

Hi, you can use the Sexpr{} command to include R output in a table:

<<Normal1,echo=T>>=
qs=1
@

Stores value 1 in object qs (alternatively written as qs <- 1).
Using \Sexpr{qs} (in plain tex or ERT in lyx) prints the value of qs. This can be included in a table:

\begin{tabular}{|c|}
\hline ...