l*****k 发帖数: 587 | 1 I can do it in R, but not sure if sas can also handle it.
I have 26 lists, now I want to generate their pairwise overlaps
I did the overlap in R, now the output is
list1 list2 both_up both_down
a c x x
a b x x
a c x x
.
.
.
b a x x
b b x x
.
.
.
list1 is actually list2, the whole paiwise comparison has 26*26 row
can I transform it to matrix format using proc transpose?
the result should have list1 as row, list2 as column, their element
intersection are their overlaps
transpose does not do it when I go:
proc sort data=mydata out=mydata1; by list1 list2; run;
proc transpose data=mydata1 out=mydata2;
by list1, list2;
id list2;
var both_up;
run;
I want to build the matrix, both_ups on top triangle
both_downs on bottom triangle, can that be done too? |
|