
Dear list,
I would like to know if there is a package in R which is able to set the structure of the element of a list or dataframe in order to use xtable's options without problems.  I will do an example to be more clear:
if I have a list like this with the following element:

$ind1

                      year1        year2    year3
p                    45                34          56
q                    19                45          76
r                     90                 5          10

$ind2            

                        year2
p                        6
q                        24
r                        76


when I use xtable (library(xtable)),I cannot use the options align cause I have two table with different number of columns. So I'm looking for (I havent found anything useful yet)  something that allows me to set the structure of each element of the list or a dataframe before passing it through xtable, in order to get something like this:
 

$ind1

                      year1        year2    year3
p                    45                34          56
q                    19                45          76
r                     90                 5          10

$ind2            

                      year1       year2       year3
p                      NA              6              NA
q                      NA             24             NA
r                       NA             76             NA

Thanks for your attention!!


	[[alternative HTML version deleted]]

