Answering my own question for the record
To include latex code generated by R through Sweave one has to specify a
filename with a .tex extension save the latex files there. In that way
Sweave doesnt print the tex code in the pdf document by saves it in the
specified place.

 In LyX these tex documents can be included as child documents Insert > File
>Child Document
Generate pdf and update the pdf directly afterwards. If you find a errors,
update a few times before looking for something else


2009/2/27 christiaan pauw <[email protected]>

> Hi Everybody
> I started using R with LyX (through Sweave) recently (earlier today
> actually) and can see from here that it has great potential.
>
> R has functions can generate latex tables which is highly cusomizable. When
> these functions are run using sweave in LyX the do exactly what they are
> supposed to do and generate Latex code. LyX then typesets the verbatim code
> perfectly as in the pdf document. What I want is obviously the table and not
> the latex code that produces the table. When I paste that code into ERT it
> generate the table perfectly. I now want sweave to generate its output
> inside something like ERT
>
> Is there a way to say to LyX "what follows here is LaTeX and it must be
> handled like you include ERT"   ----latex code generated by sweave comes
> here ---- "close ERT-like environment"
>
> regrads
> Christiaan
>

Reply via email to