Re: [R] How to merge two tables

2016-02-23 Thread Michael Friendly
Hi Xiyan, You don't show your original data, so * If you produced `cross` and `age` tables by summing the counts from a single larger data set, go back to that and do it again. but now include age/ * Otherwise, you can use vcdeExtra::expand.dft()` on both of these data sets to expand to indi

Re: [R] How to merge two tables

2016-02-22 Thread Jim Lemon
Hi Xiyan, It looks like your tables have different numbers of cases. There are: 66 DEAD FEMALES in "cross" 56 DEAD FEMALES in "age" 48 NON-DEAD FEMALES in "cross" 58 NON-DEAD FEMALES in "age" and so on. Perhaps there is some mistake with the counts. If this is the problem you could expand the co

Re: [R] How to merge two tables

2016-02-22 Thread Jeff Newmiller
I can see no coherent way to merge these two tables. They do not appear to have consistent definitions for uniqueness of individual rows. Nor do they have consistent column definitions. If you think they do, you will need to be more clear in your question about how you want them to be merged.

[R] How to merge two tables

2016-02-22 Thread Xiyan Lon
Dear all, I am currently studying categorical data analysis, if I have two tables: R> cross sex cross death count 1 FEMALE WEF YES26 2MALE WEF YES14 3 FEMALE OGG YES32 4MALE OGG YES43 5 FEMALE TGA YES 8 6MALE TGA YES10 7 FEMALE