Hi,
I am trying to output a table in a Latex format with write.mtable.
This is my code:
h.summary <- mtable("linear" = hlm, "quadratic" = hqd,
summary.stats=c("R-squared","adj. R-squared",
"p"))
h.summary <- relabel(h.summary, "J" = "J",
"I(J^2)" = "J^2")
write.mtable(h.summary, forLatex=TRUE, file="hsummary.tex")
The result is a nice text table of this format
================================== linear quadratic
-----------------------------------
(Intercept) 0.095*** 0.061***
(0.001) (0.001)
J 1.185*** 2.319***
(0.009) (0.014)
J^2 -1.392***
(0.016)
-----------------------------------
R-squared 0.768 0.899
adj. R-squared 0.768 0.898
p 0.000 0.000
==================================
but no latex output whatsoever.
Where am I wrong?
On May 8, 2010, at 2:10 PM, michele wrote:> Hi, > I am trying to output a table in a Latex format with write.mtable. > This is my code: > > h.summary <- mtable("linear" = hlm, "quadratic" = hqd, > summary.stats=c("R-squared","adj. R-squared", "p")) > h.summary <- relabel(h.summary, "J" = "J", "I(J^2)" = "J^2") > write.mtable(h.summary, forLatex=TRUE, file="hsummary.tex") > > The result is a nice text table of this format > > ==================================> linear quadratic > ----------------------------------- > (Intercept) 0.095*** 0.061*** > (0.001) (0.001) > J 1.185*** 2.319*** > (0.009) (0.014) > J^2 -1.392*** > (0.016) > ----------------------------------- > R-squared 0.768 0.899 > adj. R-squared 0.768 0.898 > p 0.000 0.000 > ==================================> > but no latex output whatsoever. > Where am I wrong?Not reading the help page? Try instead: toLatex(h.summary) -- David Winsemius, MD West Hartford, CT
The correct spelling is forLaTeX with a capital T. On Sat, May 8, 2010 at 2:10 PM, michele <michele.donato at wayne.edu> wrote:> Hi, > I am trying to output a table in a Latex format with write.mtable. > This is my code: > > h.summary <- mtable("linear" = hlm, "quadratic" = hqd, > summary.stats=c("R-squared","adj. R-squared", "p")) > h.summary <- relabel(h.summary, "J" = "J", "I(J^2)" = "J^2") > write.mtable(h.summary, forLatex=TRUE, file="hsummary.tex") > > The result is a nice text table of this format > > ==================================> ? ? ? ? ? ? ? ? linear ? quadratic > ----------------------------------- > (Intercept) ? ? ?0.095*** ?0.061*** > ? ? ? ? ? ? ? ?(0.001) ? (0.001) > J ? ? ? ? ?1.185*** ?2.319*** > ? ? ? ? ? ? ? ?(0.009) ? (0.014) > J^2 ? ? ? ? ? ? ? ? -1.392*** > ? ? ? ? ? ? ? ? ? ? ? ? ?(0.016) > ----------------------------------- > R-squared ? ? ? ? 0.768 ? ? 0.899 > adj. R-squared ? ?0.768 ? ? 0.898 > p ? ? ? ? ? ? ? ? 0.000 ? ? 0.000 > ==================================> > but no latex output whatsoever. > Where am I wrong? > > ______________________________________________ > 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. >