Skip to content
Prev 316889 / 398506 Next

adjacency list to non-symmetric matrix

If the order of people in the original data frame is important, one more line matches your example output:
group
person a b c d
  Sam  1 1 1 0
  Greg 1 0 0 0
  Tom  0 1 1 1
  Mary 0 1 0 1

----------------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352