Displaying 1 result from an estimated 1 matches for "id_ap".
Did you mean:
id_a
2012 Mar 13
2
Matrix Another table
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(data=NA,nrow=num_AP,ncol=num_AP,
byrow=TRUE,dimnames=list(id_ap,id_ap))
1 2 3 4 5 6 7
1 NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA
3 NA NA NA 4 NA NA NA 4
NA NA NA NA NA NA NA 5
NA NA NA NA NA NA NA...