I'm new to R Markdown and got a problem right now. I want to do a Table one with mean and sd for some variables and for that pursue I'm using compareGroups and createTable. There is also a function, called export2latex, which converts the table into LaTex code but unfortunately I don't know how to tell R Markdown that the current chunk is already Latex and it should convert it.
I've tried it with results = 'tex' in the chunk options but without success. Right now it just displays the latex code in my pdf like this image. Here is the image of my code.
Does anybody know how to solve this problem?
UPDATE As mentioned, results="asis" helped out, so thank you. But there occurs a second problem after doing that. It seems like you need to use such a latex generated code as an inline expression, because knitr can't handle the latex math environment. So I did it like this. Now LaTex is able to compile the file but now there appears two dollar signs in my pdf.
Can someone tell me how to get rid of it?