[R] xtable-longtable question

Felipe Carrillo mazatlanmexico at yahoo.com
Thu Jan 8 16:50:26 CET 2009


Thanks Duncan, I'll try that with my data.

--- On Wed, 1/7/09, Duncan Mackay <mackay at northnet.com.au> wrote:

> From: Duncan Mackay <mackay at northnet.com.au>
> Subject: Re: [R] xtable-longtable question
> To: mazatlanmexico at yahoo.com
> Cc: r-help at r-project.org
> Date: Wednesday, January 7, 2009, 1:15 PM
> I use Sweave and longtable but have not used them together.
> 
> It can be done but you may find the package booktabs
> helpful for headers 
> and footers for longtable and tables
> as it allows you to put different first and last page
> headers to the rest. 
> Something like (untested)
> PS You do not need to put \set longtables or something
> like that if you 
> have the latest longtable package as it is no longer
> required
> 
> % all table headers
> \toprule
> \addlinespace[3pt]
> \multicolumn{1}{c}{colname 1} & ...\\
> \midrule
> \addlinespace[3pt]
> \endhead
> 
> % if want different first 1
> \toprule
> \addlinespace[3pt]
> \multicolumn{1}{c}{colname 1} & ...\\
> \midrule
> \addlinespace[3pt]
> \endfirsthead
> 
> % last footer
> \bottomrule
> \endlastfoot
> 
> % other footers
> \addlinespace[5pt]
> \multicolumn{3}{r}{Continued next page}\\
> \midrule
> \endfoot
> 
> Regards
> 
> Duncan Mackay
> Department of Agronomy and Soil Science
> University of New England
> ARMIDALE NSW 2351
> Email (home): mackay at northnet.com.au
> 
> At 05:31 8/01/2009, you wrote:
> >Hello:
> >I am using Sweave to generate a PDF with figures and
> tables and was 
> >wondering if is possible to carry on table headers and
> some kind of 
> >caption like 'Continued' to the next PDF page
> when creating long tables.
> >
> >Felipe D. Carrillo
> >Supervisory Fishery Biologist
> >Department of the Interior
> >US Fish & Wildlife Service
> >California, USA
> >
> >______________________________________________
> >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