Re: [R] Matrix Another table

2012-03-13 Thread RMSOPS
Hello, this solve my problem. table(testdata$source, testdata$destine) Thanks -- View this message in context: http://r.789695.n4.nabble.com/Re-Matrix-Another-table-tp4469376p4469384.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Matrix Another table

2012-03-13 Thread Sarah Goslee
Hi, On Tue, Mar 13, 2012 at 7:51 AM, RMSOPS wrote: > I have next table > source destine > 3 3 > 7 7 > 6 6 > 3 4 >  4 4 >  4 3 > 3 3 > 3 3 >  3 3 >  3 3 > 3 4 >  4 4 >  4 3 >  3 4 >  4 3 It is so much easier if you use dput to provide reproducible data, as the posting guide asks. There's no way f

[R] Matrix Another table

2012-03-13 Thread RMSOPS
I have next table source destine 3 3 7 7 6 6 3 4 4 4 4 3 3 3 3 3 3 3 3 3 3 4 4 4 4 3 3 4 4 3 I'm trying to create an array with the number of occurrences between the source and destination. id_ap<-levels(factor(df$v_source)) num_AP<-length(levels(factor(df$v_source))) mat<-matrix(