I have a file I'm working on in R-Studio, and it was working really well (have about two pages worth of output that does work). But when I try to add to it with a new table, I keep getting:
> "Running pdflatex.exe on playerArbitrationProfile.tex...failed"
The problem is in the R-code that prints the table. Here's what I currently have for that:
<<echo=False,results=tex>>=
print(xtable((transactions),align=c(rep('c',3),rep('c',ncol(transactions)-2))),sanitize.colnames.function=bold,include.rownames=FALSE,latex.environments = "left",hline=NULL,floating=FALSE, size="\\fontsize{2pt}{3pt}\\selectfont",add.to.row=list(pos=list(1:(nrow(transactions)),0), command=c( '\\midrule\n','\\toprule\n')),tabular.environment = 'tabularx', width="7in")
@
The table (built in R) has three columns: transaction date (character), transaction team (character), and transaction description (character). The table has 17 observations. The transaction description column is slightly lengthy, but I don't think the length is the issue considering I tried running it without that column and it didn't make a difference (on another note, if anyone can give an easy way to get the text to wrap in that third column, that would be appreciated). Does anyone see any issues in the code above that would keep preventing my report from running?
Thanks!
Best Answer
I think the problem might be you are using
Sweave
(results=tex
) syntax, but usingknitr
(where the syntax would beresults='asis'
)In any case, the following compiles for me
EDIT: Working Sweave version: