Open mbojan opened 3 years ago
Following recent updates to network::mixingmatrix.network() the egodata method needs:
network::mixingmatrix.network()
NA
d> data(emon) d> mixingmatrix(emon$Texas, "Formalization") To From 0.5 1 2 3 4 <NA> Sum 0.5 0 6 3 1 1 1 12 1 4 36 17 20 5 8 90 2 2 14 3 5 1 5 30 3 3 18 6 3 1 0 31 4 1 7 2 2 0 1 13 <NA> 1 3 4 2 0 0 10 Sum 11 84 35 33 8 15 186 d> mixingmatrix(as.egodata(emon$Texas), "Formalization") 0.5 1 2 3 4 0.5 0 10 5 4 2 1 10 72 31 38 12 2 5 31 6 11 3 3 4 38 11 6 3 4 2 12 3 3 0 Note: Marginal totals can be misleading for undirected mixing matrices.
attrname
d> mixingmatrix(as.egodata(emon$Texas), "no-such-attribute") Error in `[[<-.data.frame`(`*tmp*`, attrname, value = integer(0)) : replacement has 0 rows, data has 25
Following recent updates to
network::mixingmatrix.network()
the egodata method needs:NA
s, e.g.:attrname
is not in the data