[R] Creating a symmetric contingency table from two vectors with different length of levels in R

From: suparna mitra <mitra_at_informatik.uni-tuebingen.de>
Date: Wed, 06 Apr 2011 10:39:21 +0200


Hello,
How can I create a symmetric contingency table from two categorical vectors having different length of levels?
For example one vector has 98 levels
TotalData1$Taxa.1

 [1] "Aconoidasida"                     "Actinobacteria (class)"

"Actinopterygii" "Alphaproteobacteria"
[5] "Amoebozoa" "Amphibia"
"Anthozoa" "Aquificae (class)"
and so on .........
98 Levels: Aconoidasida Actinobacteria (class) ....

  and the other vector has 105 levels
TotalData1$Taxa.2

    [1] Flavobacteria                    Proteobacteria
Bacteroidetes/Chlorobi group     Bacteria
    [5] Epsilonproteobacteria            Epsilonproteobacteria
 Epsilonproteobacteria
and so on ..........
105 Levels: Acidobacteria Aconoidasida Actinobacteria (class) ....

Now I want to create a symmetric contingency table. Any quick idea will be really helpful.
Best regards,
Mitra

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 06 Apr 2011 - 11:47:59 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 06 Apr 2011 - 12:20:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive