[R] xtable, sweave and resizebox

Gabor Grothendieck ggrothendieck at gmail.com
Sun Aug 9 16:21:57 CEST 2009


See the sanitize.* arguments to print.xtable.

On Sun, Aug 9, 2009 at 10:16 AM, Welma Pereira<welma.pereira at gmail.com> wrote:
> Hi again,
>
> one last annoying thing: how to deal with %, always when I use sweave to get
> a latex document the % comes as a comment and I cannot have % in my tables,
> how to sort out this annoying detail?
>
> thanks!
> Regards
> Welma
>
> 2009/8/9 Gabor Grothendieck <ggrothendieck at gmail.com>
>>
>> latex() in the Hmisc package can group rows using rgroup= and n.group=
>> arguments.
>>
>> On Sun, Aug 9, 2009 at 9:08 AM, Welma Pereira<welma.pereira at gmail.com>
>> wrote:
>> > Duncan,
>> >
>> > Thanks a lot! it sorted out the problem. I was too worried about
>> > learning
>> > how to use sweave that forgot to try other things :-)
>> >
>> > Teysseyre, I saw this doc but my table was large in width like almost
>> > not
>> > fitting the paper size..
>> >
>> > Its better now but I wonder how to make better tables using xtable like
>> > for
>> > example how to use a similar thing to \multirow..does anyone maybe have
>> > had
>> > to do that before?
>> >
>> > Thanks!
>> > regards,
>> > Welma.
>> >
>> >
>> > 2009/8/7 Duncan Mackay <mackay at northnet.com.au>
>> >
>> >> Hi Welma
>> >>
>> >> Have you thought about working with latex commands rather than Sweave
>> >> 1 reduce the space between the columns the default is 7
>> >>
>> >> \setlength\tabcolsep{3pt}
>> >>
>> >> 2 I frequently have wide tables so before the chunk
>> >> \begin{small}
>> >> <<>>
>> >> Sweave commands
>> >> @
>> >> \end{small}
>> >>
>> >> Its very late here ... and so to bed
>> >>
>> >> Regards
>> >>
>> >> Duncan Mackay
>> >> Department of Agronomy and Soil Science
>> >> University of New England
>> >> ARMIDALE NSW 2351
>> >>
>> >> At 21:03 7/08/2009, you wrote:
>> >>
>> >>> Content-Type: text/plain
>> >>> Content-Disposition: inline
>> >>> Content-length: 686
>> >>>
>> >>>
>> >>> does anyone know to rezize a table produzed by xtable?  The size of my
>> >>> table
>> >>> is too big and I would like to resize it like using resizebox but it
>> >>> gives
>> >>> an erros when I try using it
>> >>>
>> >>>
>> >>> using it its fine
>> >>>
>> >>> \SweaveOpts{echo=false}
>> >>> <<results=tex>>=
>> >>> xtable(stats0,caption='Número de transacções dos artigos frequentes e
>> >>> infrequentes',label='tab:INEStats')
>> >>> @
>> >>>
>> >>> but the size is too big
>> >>>
>> >>> so I try
>> >>> <<echo=False,results=hide>>=
>> >>> load('stats.Rdata')
>> >>> library(xtable)
>> >>>
>> >>> \resizebox{\textwidth}{!}{
>> >>> \SweaveOpts{echo=false}
>> >>> <<results=tex>>=
>> >>> xtable(stats0,caption='text',label='tab:Stats')
>> >>> @
>> >>> }
>> >>>
>> >>> and it doesn t work anymore
>> >>>
>> >>> any hints?
>> >>>
>> >>>        [[alternative HTML version deleted]]
>> >>>
>> >>> ______________________________________________
>> >>> 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.
>> >>>
>> >>
>> >>
>> >
>> >        [[alternative HTML version deleted]]
>> >
>> >
>> > ______________________________________________
>> > 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.
>> >
>> >
>
>




More information about the R-help mailing list