I am making a series of frequency/contingency tables and ideally I'd like to put them together into one
tab1 <- ftable(xtabs( ~Survived+Age, Titanic))
tab2 <- ftable(xtabs( ~Class+Age, Titanic))
rbind puts them together, but you lose the row and column names.
I'm wondering if I should try grabbing the levels from the variables and put them in (but that seems like a good chance to get the wrong order put in). I guess I could try converting to a data.frame and then combining, but I'd like to get some input.
Combining the tables does not allow multiple names for the row variables.