Hi all, Anyone experienced in the LaTeX format? I'm trying to use the xtable package to create nice anova tables, but how do I do to produce a pdf from the resulting LaTeX table? I've tried WinShell and MiKTeX, but I couldn't get any of them working... Here's an example of the output in R: % latex table generated in R 2.9.2 by xtable 1.5-6 package % Tue Nov 24 14:17:32 2009 \begin{tabular}{lrrrrr} \hline & Df & Sum Sq & Mean Sq & F value & Pr($>$F) \\ \hline cat & 2 & 40.50 & 20.25 & 6.66 & 0.0019 \\ Residuals & 107 & 325.13 & 3.04 & & \\ \hline \end{tabular} Best regards, Joel _________________________________________________________________ Lagra alla dina foton på Skydrive. Det är enkelt och säkert! http://www.skydrive.live.com [[alternative HTML version deleted]]
Joel F?rstenberg-H?gg wrote:> Hi all, > > > > Anyone experienced in the LaTeX format? > > > > I'm trying to use the xtable package to create nice anova tables, but how do I do to produce a pdf from the resulting LaTeX table? I've tried WinShell and MiKTeX, but I couldn't get any of them working... > > > > Here's an example of the output in R: > > > > % latex table generated in R 2.9.2 by xtable 1.5-6 package > % Tue Nov 24 14:17:32 2009 > \begin{tabular}{lrrrrr} > \hline > & Df & Sum Sq & Mean Sq & F value & Pr($>$F) \\ > \hline > cat & 2 & 40.50 & 20.25 & 6.66 & 0.0019 \\ > Residuals & 107 & 325.13 & 3.04 & & \\ > \hline > \end{tabular}The output from xtable (above) is not a self-contained, complete LaTeX file. You need, at the very least, A \documentclass statement at the beginning of the file and the code above needs to be inside a \begin{document} ... \end{document} pair. Then, the pdflatex (I beilieve this exists in MiKTeX) command builds a pdf file. Kevin> > > > Best regards, > > > > Joel-- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Dalla Lana School of Public Health University of Toronto email: kevin.thorpe at utoronto.ca Tel: 416.864.5776 Fax: 416.864.3016
Hi Joel, that's a LaTeX issue you have there, nothing wrong with R. You should post your message on a LaTeX Forum about how to use LaTeX. http://www.latex-community.org/ Regards Benoit -----Message d'origine----- De : r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] De la part de Joel F?rstenberg-H?gg Envoy? : mardi 24 novembre 2009 15:02 ? : r-help at r-project.org Objet : [R] From R to LaTeX to pdf? Hi all, Anyone experienced in the LaTeX format? I'm trying to use the xtable package to create nice anova tables, but how do I do to produce a pdf from the resulting LaTeX table? I've tried WinShell and MiKTeX, but I couldn't get any of them working... Here's an example of the output in R: % latex table generated in R 2.9.2 by xtable 1.5-6 package % Tue Nov 24 14:17:32 2009 \begin{tabular}{lrrrrr} \hline & Df & Sum Sq & Mean Sq & F value & Pr($>$F) \\ \hline cat & 2 & 40.50 & 20.25 & 6.66 & 0.0019 \\ Residuals & 107 & 325.13 & 3.04 & & \\ \hline \end{tabular} Best regards, Joel _________________________________________________________________ Lagra alla dina foton pe Skydrive. Det dr enkelt och sdkert! http://www.skydrive.live.com [[alternative HTML version deleted]]
Joel, You should consider using Sweave: http://www.stat.umn.edu/~charlie/Sweave/ -or- http://en.wikipedia.org/wiki/Sweave Regards, Tom Joel F?rstenberg-H?gg wrote:> Hi all, > > > > Anyone experienced in the LaTeX format? > > > > I'm trying to use the xtable package to create nice anova tables, but how do I do to produce a pdf from the resulting LaTeX table? I've tried WinShell and MiKTeX, but I couldn't get any of them working... > > > > Here's an example of the output in R: > > > > % latex table generated in R 2.9.2 by xtable 1.5-6 package > % Tue Nov 24 14:17:32 2009 > \begin{tabular}{lrrrrr} > \hline > & Df & Sum Sq & Mean Sq & F value & Pr($>$F) \\ > \hline > cat & 2 & 40.50 & 20.25 & 6.66 & 0.0019 \\ > Residuals & 107 & 325.13 & 3.04 & & \\ > \hline > \end{tabular} > > > > Best regards, > > > > Joel > > _________________________________________________________________ > Lagra alla dina foton p? Skydrive. Det ?r enkelt och s?kert! > http://www.skydrive.live.com > [[alternative HTML version deleted]] > > > ------------------------------------------------------------------------ > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Thomas E Adams National Weather Service Ohio River Forecast Center 1901 South State Route 134 Wilmington, OH 45177 EMAIL: thomas.adams at noaa.gov VOICE: 937-383-0528 FAX: 937-383-0033
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091124/d8b6807c/attachment-0001.pl>
Hello On 11/24/09, Joel F?rstenberg-H?gg <joel_furstenberg_hagg at hotmail.com> wrote:> I'm trying to use the xtable package to create nice anova tables, but how do I do to produce a pdf from the resulting LaTeX table? I've tried WinShell and MiKTeX, but I couldn't get any of them working... >Take a look at the documentation of RcmdrPlugin.Export. Regards Liviu
As a general observation, few, if any, statistical packages, generate tables in the format what you might think you need or want. R is not an exception. Then it is better to transfer the table to a spreadsheet, shift things around, add headers, etc.. The R2HTML library is useful for that operation. When things are the way you want it, transfer it to LaTex via a text file, e.g. .csv. Tom Joel F?rstenberg-H?gg wrote:> Hi all, > > > > Anyone experienced in the LaTeX format? > > > > I'm trying to use the xtable package to create nice anova tables, but how do I do to produce a pdf from the resulting LaTeX table? I've tried WinShell and MiKTeX, but I couldn't get any of them working... > > > > Here's an example of the output in R: > > > > % latex table generated in R 2.9.2 by xtable 1.5-6 package > % Tue Nov 24 14:17:32 2009 > \begin{tabular}{lrrrrr} > \hline > & Df & Sum Sq & Mean Sq & F value & Pr($>$F) \\ > \hline > cat & 2 & 40.50 & 20.25 & 6.66 & 0.0019 \\ > Residuals & 107 & 325.13 & 3.04 & & \\ > \hline > \end{tabular} > > > > Best regards, > > > > Joel > > _________________________________________________________________ > Lagra alla dina foton p? Skydrive. Det ?r enkelt och s?kert! > http://www.skydrive.live.com > [[alternative HTML version deleted]] > > > ------------------------------------------------------------------------ > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >