I want to use 'R' script to convert my Sweave file into PDF ultimately. I learnt that, Sweave(file="TEST.Rnw") is the function that can convert my .Rnw into .tex.
But I see a strange issue when I use that on my .Rnw file that has a code chunk like this:
<<results='asis', comment=NA, echo=FALSE, warning=FALSE>>=
...
@
This is the error, I am getting:
Error in match.arg(options$results, c("verbatim", "tex", "hide")) :
'arg' should be one of "verbatim", "tex", "hide"
Please note that Sweave() works when I change results='tex'. But that does not help me as I have some xtable content that needs to be coming in latex. The simple question, therefore, is, when the option results='asis' works on RStudio (Complile PDF), why it does not with Sweave function call? Am I missing something?
Any lights on this will be highly appreciated... Thanks, in advance.
Regards, Tharma
knitr
uses "asis" whileSweave
uses "tex". – Roman Luštrik