
Dear list,
I'm trying to generate a latex Document in which there are a lot of tables. I'm using the Sweave function in the package utils, but I'm having a lot of problems with the format. This is my code:
\documentclass[a4paper]{amsbook}
\title{Schema di bilancio}
\begin{document}
\maketitle
<<echo=F,results=hide>>=
report=Bilanci
mynames<-names(report)
mynames[mynames=="AA01"]<-"Immobilizzazioni tecniche nette"
mynames[mynames=="AA01I"]<-"Immobilizzazioni imm. nette"
mynames[mynames=="AA01M"]<-"Immobilizzazioni mat. nette"
mynames[mynames=="AA02"]<-"Partecipazioni e crediti fin."
mynames[mynames=="AA02B"]<-"Attivita' fin. a breve"
mynames[mynames=="AA02L"]<-"Immobilizzazioni finan."
mynames[mynames=="AA03"]<-"Magazzino"
mynames[mynames=="AA04"]<-"Crediti commerciali"
mynames[mynames=="AA05"]<-"Liquidita'"
mynames[mynames=="AA06"]<-"Altre attivita'"
mynames[mynames=="AA07"]<-"Tot attivita'"
mynames[mynames=="AL01"]<-"Capitale netto"
mynames[mynames=="AL02"]<-"Fondo tfr"
mynames[mynames=="AL03"]<-"Altri fondi"
mynames[mynames=="AL04"]<-"Debiti commerciali"
mynames[mynames=="AL04A"]<-"Anticipi di clienti"
mynames[mynames=="AL04B"]<-"Debiti vs fornitori"
mynames[mynames=="AL05"]<-"Debiti fin. tot."
mynames[mynames=="AL05B"]<-"Debiti fin. a breve"
mynames[mynames=="AL05L"]<-"Debiti fin. a medio/lungo"
mynames[mynames=="AL99"]<-"Altre passivita'"
mynames[mynames=="AL06"]<-"Tot passivita'"
mynames[mynames=="EC01"]<-"Ricavi netti"
mynames[mynames=="EC02"]<-"Produzione int. capitalizzate"
mynames[mynames=="EC03"]="Variazione scorte prod finiti"
mynames[mynames=="EC04"]<-"Acquisti"
mynames[mynames=="EC05"]<-"Variazioni scorte mat. prime"
mynames[mynames=="EC06"]<-"Costi per servizi e god. di beni terzi"
mynames[mynames=="EC07"]<-"Costo del lavoro tot"
mynames[mynames=="EC08"]<-"Ammortamenti e accantonamenti"
mynames[mynames=="EC08A"]<-"Ammortamenti"
mynames[mynames=="EC08B"]<-"Accantonamenti e utilizzi di riserve"
mynames[mynames=="EC09"]<-"Oneri fin."
mynames[mynames=="EC10"]<-"Proventi fin."
mynames[mynames=="EC11"]<-"Ricavi diversi netti"
mynames[mynames=="EC11A"]<-"Altri ricavi netti ord"
mynames[mynames=="EC11C"]<-"Contributi in conto esercizio"
mynames[mynames=="EC12"]<-"Proventi straord. netti"
mynames[mynames=="EC13"]<-"Imposte"
mynames[mynames=="EC14"]<-"Utile netto rettificato"
mynames[mynames=="EC15"]<-"Rettifiche"
mynames[mynames=="EC16"]<-"Utile dell'esercizio"
names(report)<-mynames
report=split(report,report$CFISCALE)
report1=lapply(report,function(x){
t(x)})
@
<<echo=F,results=tex>>=
report2=lapply(report1, function(x) {
print(xtable(x,na.string="-"))})
@
\end{document}


Even if I put the code referring to the title, in my pdf document I don't get it and I don't know why. Secondly I get the following error message:(\end occurred when \ifnum on line 2150 was incomplete)
the results of this error is that I loose a lot of tables. Instead of having 500 tables I have just 250 tables. Another problem is that the format is not what I would like to get, my tables appear at the center of the page and I would like to put them at the left (the result is that my table are cut), and I don't know how to do that, I've tried to put in the xtable function the option table.placement="H" but it seems that it doesn't work.An example of what I get by using the split function and then the xtable function is:
&amp; 49 &amp; 48 &amp; 47 \\ 
  \hline
CFISCALE &amp; 5060157 &amp; 5060157 &amp; 5060157 \\ 
  RAGSOCB &amp; GIUSEPPE TARENZI S.R.L. &amp; GIUSEPPE TARENZI S.R.L. &amp; GIUSEPPE TARENZI S.R.L. \\ 
  ANNO &amp; 2005 &amp; 2006 &amp; 2007 \\ 
  Ricavi netti &amp;  77 &amp;  98 &amp; 124 \\ 
  Produzione int. capitalizzate &amp; 0 &amp; 0 &amp; 0 \\ 
  Variazione scorte prod finiti &amp; 2059 &amp; 2105 &amp; 2120 \\ 
  Acquisti &amp; 1542 &amp; 1564 &amp; 1576 \\ 
  Costi per servizi e god. di beni terzi &amp; 122 &amp; 135 &amp; 121 \\ 
  Costo del lavoro tot &amp; 273 &amp; 281 &amp; 301 \\ 
  Ammortamenti e accantonamenti &amp; 11 &amp;  5 &amp;  7 \\ 
  Ammortamenti &amp; 9.9 &amp; 4.5 &amp; 6.3 \\ 
  Accantonamenti e utilizzi di riserve &amp; 1.1 &amp; 0.5 &amp; 0.7 \\ 
  Oneri fin. &amp; 38 &amp; 42 &amp; 35 \\ 
  Proventi fin. &amp; 1 &amp; 0 &amp; 1 \\ 
  Ricavi diversi netti &amp;   0 &amp; -13 &amp; -33 \\ 
  Altri ricavi netti ord &amp;   0 &amp; -13 &amp; -33 \\ 
  Contributi in conto esercizio &amp; 0 &amp; 0 &amp; 0 \\ 
  Proventi straord. netti &amp; 1 &amp; 0 &amp; 0 \\ 
  Imposte &amp; 73 &amp; 78 &amp; 80 \\ 
  Utile netto rettificato &amp; 79 &amp; 85 &amp; 92 \\ 
  Utile dell'esercizio &amp; 79 &amp; 85 &amp; 92 \\ 
  Immobilizzazioni tecniche nette &amp; 269 &amp; 267 &amp; 274 \\ 
  Partecipazioni e crediti fin. &amp; 0 &amp; 3 &amp; 0 \\ 
  Magazzino &amp; 592 &amp; 623 &amp; 656 \\ 
  Crediti commerciali &amp; 17.56393 &amp; 28.15887 &amp; 26.14891 \\ 
  Liquidita' &amp;  14 &amp;  &amp; 177 \\ 
  Altre attivita' &amp;  -892.564 &amp;  &amp; -1133.149 \\ 
  Tot attivita' &amp; 0.000000000 &amp; 0.005924951 &amp; 0.000000000 \\ 
  Immobilizzazioni imm. nette &amp; 53.8 &amp; 53.4 &amp; 54.8 \\ 
  Immobilizzazioni mat. nette &amp; 215.2 &amp; 213.6 &amp; 219.2 \\ 
  Attivita' fin. a breve &amp; 0.0 &amp; 1.5 &amp; 0.0 \\ 
  Immobilizzazioni finan. &amp; 0.0 &amp; 1.5 &amp; 0.0 \\ 
  Capitale netto &amp; 0.000000000 &amp; 0.002773298 &amp; 0.000000000 \\ 
  Fondo tfr &amp; -558.4306 &amp; -666.3115 &amp; -533.6478 \\ 
  Altri fondi &amp; 0 &amp; 0 &amp; 0 \\ 
  Debiti commerciali &amp; 558.4306 &amp; 666.3146 &amp; 533.6478 \\ 
  Debiti fin. tot. &amp; 0.000000e+00 &amp; 2.340336e-05 &amp; 0.000000e+00 \\ 
  Tot passivita' &amp; 0.000000000 &amp; 0.005924951 &amp; 0.000000000 \\ 
  Anticipi di clienti &amp; 0 &amp; 0 &amp; 0 \\ 
  Debiti vs fornitori &amp; 558.4306 &amp; 666.3146 &amp; 533.6478 \\ 
  Debiti fin. a breve &amp; 0.000000e+00 &amp; 1.170168e-05 &amp; 0.000000e+00 \\ 
  Debiti fin. a medio/lungo &amp; 0.000000e+00 &amp; 1.170168e-05 &amp; 0.000000e+00 \\ 
  Altre passivita' &amp; 0 &amp; 0 &amp; 0 \\
I would like to not see the first line, namely &amp; 49 &amp; 48 &amp; 47 \\, in my table wich is the result of the split function applied to a list. Secondly I don't want the repetion of the variables Cfiscale and Ragsocb, so my result should be:


   \hline
 CFISCALE &amp; 5060157  \\ 
   RAGSOCB &amp; GIUSEPPE TARENZI S.R.L.\\
but I don't know I to solve it in a list.
Someone knows how to solve these problems!
Thanks for your attention!




	[[alternative HTML version deleted]]

