Dear list,
I'm using the Sweave function in order to get some report.
Here one chunk:
<<echo=F,results=tex>>report<-lapply(repor, function(x) {
(print(xtable(data.frame(x[1:2,]),
align="|l|rrr|"),floating=FALSE,tabular.
environment="longtable",include.colnames=FALSE,size="\\small"))
(print(xtable(data.frame(x[3:nrow(x),]),align="l|rrr"),floating=FALSE,tabular.
environment="longtable",include.colnames=FALSE,add.to.row=list(pos=list
(1,12,23,43), command=c("\\hline\\\\\\multicolumn{1}{l|}{\\textbf{Stato
Patrimoniale Attivo}}\\\\","\\\\\\multicolumn{1}{l|}{\\textbf{Stato
Patrimoniale Passivo}}\\\\","\\\\\\multicolumn{1}{l|}{\\textbf{Conto
Economico}}
\\\\","\\\\\\multicolumn{1}{l|}{\\textbf{Indicatori di
Bilancio}}\\\\")),size="
\\small",NA.string="."))})
I would like to Know if somewhere in xtable I can put the command \pagebreak .
The object repor over I pass the lapply function and after the xtable function
has more or less 200 tables. So at the end of each table, the new table would
have to start at a new page. I tried to put \pagebreak in "command"
but it
doesent work.Any suggestions???
Moreover someone knows how to set the width of each column?
Thanks for your attention
n.vialma at libero.it schrieb:> I would like to Know if somewhere in xtable I can put the command \pagebreak . >There is an add.to.row argument in print.xtable, where you could add this command. You have to specify a line where to add this though. How about appending each printed xtable object to a file and inserting the \pagebreak command with R before appending the next xtable object? No idea how this interacts with Sweave though....> The object repor over I pass the lapply function and after the xtable function > has more or less 200 tables. So at the end of each table, the new table would > have to start at a new page. I tried to put \pagebreak in "command" but it > doesent work.Any suggestions??? > Moreover someone knows how to set the width of each column? >Have a look at ?xtable and read the documentation of 'align', it is described there. HTH Jannis> Thanks for your attention > > ______________________________________________ > 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. > >