[R] Converting tables to matrices

selthy selthy at hotmail.com
Fri Sep 17 06:04:35 CEST 2010


Hi there,
I'm a real beginner to R. I have two tables of the following format (~1000
rows in each):
Table 1 (experimental)
N        bp
1064   12312089
856     12312234
....

Table 2 (control)
8463    34728908
879      34443290
.....

I would like to do Fisher's exact tests comparing each row of the tables
e.g. the test for row 1 would look something like this:
     Experimental    Control
N    1064              8463
bp  12312089        34728908

How do I either:
a) Create ~1000 2x2 matrices from each row of the two tables?, or
b) Use the fisher.test function repeatedly for each row of the two tables?

Thanks for our help!
Selthy
-- 
View this message in context: http://r.789695.n4.nabble.com/Converting-tables-to-matrices-tp2543309p2543309.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list