I still working in the mod of crosstabulation plugin. 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 ;)
I, don't make significative changes. I add the arguments row.vars and col.vars, thats are pased to ftable function. 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 bind.tables <- function (row.vars=NULL, col.vars=NULL, ...) { tables <- list (...) output <- unlist (tables) dim (output) <- c (dim (tables[[1]]), length (tables)) dimnames (output) <- c (dimnames (tables[[1]]), list (statistic=names(tables))) if (is.null(col.vars)) col.vars <- length(dim(tables[[1]])) ftable (output, row.vars=row.vars, col.vars=col.vars) } I attached the plugin as a simple tar.gz file, I will read the manual for make plugins to make a better plugin. 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. I hope that you like this mod of crosstabulation plugin. -- Amor y Paz _ _ \\ // _ \\// \\ ^^> \____/ CHAU
crosstab1.tar.gz
Description: GNU Zip compressed data
------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________ RKWard-devel mailing list RKWard-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rkward-devel