I would like to output a latex-table as jpg from R. For example:
df <- data.frame(variable = c("a","b","c"), n=1:3)
xtable(df)
I could use knitr with:
\documentclass{article}
\usepackage[english,ngerman]{babel}
\begin{document}
<<echo=FALSE, results="asis">>=
xtable(xdf)
@
\end{document}
But this produces a pdf-file. I could screenshot the table and save it as jpg but I would like to avoid this work around.
My preference would be to output the latex-table from R into a windows
windows(width=20,height=15)
and then to save as jpg-file
savePlot("latex_table", type="jpg")
But I suppose that this is not possible since it has to be first interpreted by latex.
The reason why I want to do it in this way: I would like to produce regulary updated graphs and tables as jpg to insert them manually into a web-page. I want to use latex-table to have all the capacity of design to create nice tables.