Re: [R] Export summary statistics to latex

About this list Date view Thread view Subject view Author view Attachment view

From: Don MacQueen (macq@llnl.gov)
Date: Tue 18 May 2004 - 00:19:59 EST


Message-id: <p06002001bcce7a4ab985@[128.115.153.6]>

There is also the xtable package.
-Don

> library(xtable)
> x <- 1:3 ; y <- rnorm(3)
> foo <- lm(y~x)
> foo

Call:
lm(formula = y ~ x)

Coefficients:
(Intercept) x
      -2.552 1.090

> bah <- xtable(foo)
> bah
% latex table generated in R 1.9.0 by xtable 1.2-3 package
% Mon May 17 07:18:40 2004
\begin{table}[ht]
\begin{center}
\begin{tabular}{rrrrr}
\hline
  & Estimate & Std. Error & t value & Pr($>$$|$t$|$) \\
\hline
(Intercept) & $-$2.5523 & 2.1197 & $-$1.20 & 0.4412 \\
x & 1.0900 & 0.9812 & 1.11 & 0.4666 \\
\hline
\end{tabular}
\end{center}
\end{table}

At 10:13 AM +0200 5/14/04, Ulrich Leopold wrote:
>Dear list,
>
>I would like to export the summary statistics of a regression to latex code.
>Is there an easy way of doing that?
>
>Ulrich
>
>--
>__________________________________________________
>
>Ulrich Leopold MSc.
>
>Computational Bio- and Physical Geography (CBPG)
>Institute for Biodiversity and Ecosystem Dynamics (IBED)
>Faculty of Science
>University of Amsterdam
>Nieuwe Achtergracht 166
>NL-1018WV Amsterdam
>
>Room: B2.52
>Phone: +31 20 525 7456 (7451 Secretary)
>Fax: +31 20 525 7431
>Mobile: +31 64 220 3028
>Email: uleopold@science.uva.nl
>URL: www.science.uva.nl/ibed/cbpg
>
>______________________________________________
>R-help@stat.math.ethz.ch mailing list
>https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

-- 
--------------------------------------
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA

______________________________________________ R-help@stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:11 EST