[R] How to combine xtable and minipage with Sweave ?

Ptit_Bleu ptit_bleu at yahoo.fr
Fri Mar 13 17:07:11 CET 2009


Thanks Dieter for the link.

In fact it may be a problem with R.
The .tex created with R for the table put \begin{table}[ht] and \end{table}\
between \begin{minipage} and \end{minipage} (see below)

If I manually change these positions, according to your link, there is no
more error ... but the table is below the graph and not side by side.

Any idea ? 
Have a nice week-end,
Ptit bleu.

File .tex created by Sweave : 

\begin{minipage}{0.45\textwidth}
% latex table generated in R 2.7.2 by xtable 1.5-4 package
% Fri Mar 13 17:00:06 2009
\begin{table}[ht]
\begin{center}
{\tiny
\begin{tabular}{lrr}
  \hline
Date & kWh\_m2 & Nbremesures \\
  \hline
2009-03-08 & 4.53 & 142 \\
  2009-03-09 & 1.70 & 142 \\
  2009-03-10 & 1.96 & 147 \\
   \hline
\end{tabular}
}
\end{center}
\end{table}\end{minipage}

-- 
View this message in context: http://www.nabble.com/How-to-combine-xtable-and-minipage-with-Sweave---tp22493636p22499672.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list