<div class="gmail_quote"><br><div>I still working in the mod of crosstabulation plugin.</div><div><br></div>I have checked the function proposed by thomas, and I is ready for the use, it can bind contingency tables with its statistic with more than two dimensions. I don't want to be pompous, but I think that a function like this should be part of the base packages in R ;)<div>

<br></div><div>I, don't make significative changes. I add the arguments row.vars and col.vars, thats are pased to ftable function.</div><div>beside if you don't indicate the row.vars argument, it take the last level in the table for the column. I also think that the user could decide if he or she wants the statistics in rows or in colums</div>

<div><br></div><div><div>bind.tables <- function (row.vars=NULL, col.vars=NULL, ...) {</div><div class="im"><div><span style="white-space:pre-wrap">       </span>tables <- list (...)</div><div><span style="white-space:pre-wrap">  </span>output <- unlist (tables)</div>

<div><span style="white-space:pre-wrap">  </span>dim (output) <- c (dim (tables[[1]]), length (tables))</div><div><span style="white-space:pre-wrap">        </span>dimnames (output) <- c (dimnames (tables[[1]]), list (statistic=names(tables)))</div>

</div><div><span style="white-space:pre-wrap">      </span>if (is.null(col.vars))</div><div><span style="white-space:pre-wrap">           </span>col.vars <- length(dim(tables[[1]]))</div><div><span style="white-space:pre-wrap">  </span>ftable (output, row.vars=row.vars, col.vars=col.vars)</div>

<div>}</div><div><br></div><div>I attached the plugin as a simple tar.gz file, I will read the manual for make plugins to make a better plugin.</div><div><br></div><div>At now it can calculate the percents, and add sums at margins, I think that it could calculate the cumsum, but I don't know how to put cumsum with addmargins function.</div>

<div><br></div><div>I hope that you like this mod of crosstabulation plugin.</div><br>-- <br>Amor y Paz<br> _    _<br> \\  //<br>_ \\//<br>\\   ^^><br> \____/<br><br>CHAU<br>
</div>
</div><br><br>