[R] How to combine xtable and minipage with Sweave ?
Ptit_Bleu
ptit_bleu at yahoo.fr
Fri Mar 13 14:32:58 CET 2009
Hello Dieter,
And thank you for the corrections.
Concerning the point 3, I'm a bit lost. Is it a problem of place to put the
table and the graph side by side (my english is quite as low as my skills in
Latex) ?
I tried with \begin{minipage}{0.45\textwidth} instead of 0.7 and I put
"//tiny" but no success.
I tried to add some \begin{table} before \begin{minipage}[b]{0.45\linewidth}
as I saw here :
http://texblog.wordpress.com/2007/08/01/placing-figurestables-side-by-side-minipage/
http://texblog.wordpress.com/2007/08/01/placing-figurestables-side-by-side-minipage/
Again ! LaTeX Error: Not in outer par mode.
Could you give me a last clue so that I can spend a nice week-end.
Thanks in advance,
Ptiti Bleu.
last script :
------------------------------------------------
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[frenchb]{babel}
\usepackage{geometry}
\usepackage{color, pdfcolmk}
\usepackage[mediumqspace]{SIunits}
\geometry{a4paper,left=1cm,right=1cm,top=1cm,bottom=1.5cm}
\date{}
\begin{document}
\DefineVerbatimEnvironment{Sinput}{Verbatim}{formatcom = {\color[rgb]{0, 0,
0.56}}}
\DefineVerbatimEnvironment{Soutput}{Verbatim}{formatcom = {\color[rgb]{0.56,
0, 0}}}
\setkeys{Gin}{width=\textwidth}
<<echo=FALSE, results=tex>>=
rg<-read.table(file="d:/RWork/rg.txt", sep=";", dec=".", header=T, as.is=T)
@
\begin{figure}[ht]
\begin{minipage}[b]{0.45\linewidth}
\centering
<<RsingleA,echo=F,fig=T,width=2.5,height=2.5>>=
plot(1:10)
@
\caption{First figure}
\label{fig:figure1}
\end{minipage}
\end{figure}
\hspace{0.5cm}
\begin{minipage}{0.45\textwidth}
<<echo=FALSE, results=tex>>=
library(xtable)
print(xtable(rg), include.rownames=F, size="\\tiny")
@
\end{minipage}
\end{document}
--
View this message in context: http://www.nabble.com/How-to-combine-xtable-and-minipage-with-Sweave---tp22493636p22496502.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list