I can not compile a pdf file from .Rnw file if there is the argument results="asis" in my code chunk. R console wants me to se result as “verbatim”, “tex” or “hide”. However, I need to use "asis" because otherwise the table is displayed as text. Any ideas what could be the problem? Thanks Kamila
The code chunk:
<<table_symbionts, results="asis">>=
n <- 100
x <- rnorm(n)
y <- 2*x + rnorm(n)
out <- lm(y ~ x)
library(xtable)
tab <- xtable(summary(out)$coef, digits=c(0, 2, 2, 1, 2))
print(tab, type="html")
@
The output:
Writing to file Thesis.tex
Processing code chunks with options ...
Error in match.arg(options$results, c("verbatim", "tex", "hide")) :
'arg' should be one of “verbatim”, “tex”, “hide”
Calls: <Anonymous> -> SweaveParseOptions -> check -> match.arg
Execution halted