Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- begin{table}[ht]
- begin{center}
- begin{tabular}{rrrrrrr}
- hline
- & 1 & 2 & 3 & 4 & 5 & 6 \
- hline
- 1 & 181.21 & 169.01 & 130.03 & 135.93 & 142.31 & 108.11 \
- 2 & 106.80 & 130.71 & 186.43 & 126.46 & 167.28 & 137.91 \
- 3 & 162.69 & 198.98 & 188.33 & 184.30 & 147.02 & 197.38 \
- 4 & 132.42 & 150.50 & 148.69 & 134.31 & 129.52 & 172.72 \
- hline
- end{tabular}
- end{center}
- end{table}
- ! Undefined control sequence.
- l.1 begin
- {table}[ht]
- ?
- Process interrupted by user
- ## Standard xtable use
- print(xtable(summary(npk.aov)))
- % latex table generated in R 2.12.2 by xtable 1.5-6 package
- % Fri Aug 12 16:00:48 2011
- begin{table}[ht]
- begin{center}
- begin{tabular}{lrrrrr}
- hline
- & Df & Sum Sq & Mean Sq & F value & Pr($>$F) \
- hline
- block & 5 & 343.29 & 68.66 & 4.45 & 0.0159 \
- N & 1 & 189.28 & 189.28 & 12.26 & 0.0044 \
- P & 1 & 8.40 & 8.40 & 0.54 & 0.4749 \
- K & 1 & 95.20 & 95.20 & 6.17 & 0.0288 \
- N:P & 1 & 21.28 & 21.28 & 1.38 & 0.2632 \
- N:K & 1 & 33.13 & 33.13 & 2.15 & 0.1686 \
- P:K & 1 & 0.48 & 0.48 & 0.03 & 0.8628 \
- Residuals & 12 & 185.29 & 15.44 & & \
- hline
- end{tabular}
- end{center}
- end{table}
- documentclass{article}
- begin{document}
- ...
- end{document}
- % latex table generated in R 2.12.2 by xtable 1.5-6 package
- % Fri Aug 12 16:29:29 2011
- begin{tabular}{lrrrrr}
- hline
- & Df & Sum Sq & Mean Sq & F value & Pr($>$F) \
- hline
- block & 5 & 343.29 & 68.66 & 4.45 & 0.0159 \
- N & 1 & 189.28 & 189.28 & 12.26 & 0.0044 \
- P & 1 & 8.40 & 8.40 & 0.54 & 0.4749 \
- K & 1 & 95.20 & 95.20 & 6.17 & 0.0288 \
- N:P & 1 & 21.28 & 21.28 & 1.38 & 0.2632 \
- N:K & 1 & 33.13 & 33.13 & 2.15 & 0.1686 \
- P:K & 1 & 0.48 & 0.48 & 0.03 & 0.8628 \
- Residuals & 12 & 185.29 & 15.44 & & \
- hline
- end{tabular}
- print(xtable(summary(npk.aov)),floating=FALSE,latex.environments=NULL,booktabs=TRUE)
- > latex(summary(npk.aov)[[1]], cdec=c(0,2,2,2,4), na.blank=TRUE,
- booktabs=TRUE, table.env=FALSE, center="none", file="", title="")
- % latex.default(summary(npk.aov)[[1]], cdec = c(0, 2, 2, 2, 4), na.blank = TRUE, booktabs = TRUE, table.env = FALSE, center = "none", file = "", title = "")
- %
- begin{tabular}{lrrrrr}
- toprule
- multicolumn{1}{l}{}&multicolumn{1}{c}{Df}&multicolumn{1}{c}{Sum Sq}&multicolumn{1}{c}{Mean Sq}&multicolumn{1}{c}{F value}&multicolumn{1}{c}{Pr(textgreater F)}tabularnewline
- midrule
- block &$ 5$&$343.29$&$ 68.66$&$ 4.45$&$0.0159$tabularnewline
- N &$ 1$&$189.28$&$189.28$&$12.26$&$0.0044$tabularnewline
- P &$ 1$&$ 8.40$&$ 8.40$&$ 0.54$&$0.4749$tabularnewline
- K &$ 1$&$ 95.20$&$ 95.20$&$ 6.17$&$0.0288$tabularnewline
- N:P &$ 1$&$ 21.28$&$ 21.28$&$ 1.38$&$0.2632$tabularnewline
- N:K &$ 1$&$ 33.13$&$ 33.13$&$ 2.15$&$0.1686$tabularnewline
- P:K &$ 1$&$ 0.48$&$ 0.48$&$ 0.03$&$0.8628$tabularnewline
- Residuals &$12$&$185.29$&$ 15.44$&$$&$$tabularnewline
- bottomrule
- end{tabular}
- documentclass{article}
- usepackage[margin=1em,paperheight=8cm,paperwidth=12cm]{geometry}
- usepackage{booktabs,lipsum}
- begin{document}
- <<echo=F,message=F,warning=F,comment="">>=
- library(xtable)
- library(stargazer)
- library(kableExtra)
- library(Hmisc)
- data("mtcars") # some example data
- df <-mtcars[1:3, 1:6]
- @
- <<echo=F,results="asis">>=
- print(xtable(df,caption="Example with \texttt{xtable}"),
- booktabs=T, caption.placement="top")
- stargazer(df, summary=F,
- title="Example with \texttt{stargazer}")
- kable(df, booktabs = T,
- caption = "Example with \texttt{kable} and \texttt{kableExtra}")
- latex(df, file = '', caption="Example with \texttt{Hmisc}")
- @
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement