diff options
Diffstat (limited to 'R Scripts/analyze-cascades.R')
| -rwxr-xr-x | R Scripts/analyze-cascades.R | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/R Scripts/analyze-cascades.R b/R Scripts/analyze-cascades.R index 463de18..e758d60 100755 --- a/R Scripts/analyze-cascades.R +++ b/R Scripts/analyze-cascades.R @@ -21,7 +21,7 @@ order = rev(order(csize)) plot(sizes,counts,log='xy',type='o',lwd=3, xlab='Size of Cascade', ylab='Number of Cascades', main='Distribution of Cascade Sizes') -i = 14 +i = 4 V = which(clusters(dag)$membership==order[i]) # get all nodes in cluster cc = induced.subgraph(dag,V) Vi = vic_ids[V] @@ -35,8 +35,9 @@ cols[seed] = 'red' plot(cc,vertex.size=10,edge.arrow.size=0.5,vertex.color=cols,vertex.label.cex=1, edge.width=E(cc)$weight*20/max(E(cc)$weight),layout=layout.reingold.tilford(cc,root=seed), vertex.label=V(hyp_lcc)$vic.day[Vi]) -# vertex.label=as.Date(V(hyp_lcc)$vic.day[Vi], format ='%m/%d/%y')) -# vertex.label=V(lcc)$vic_date[Vi]) +plot(cc,vertex.size=10,edge.arrow.size=0.5,vertex.color=cols,vertex.label.cex=1, + layout=layout.reingold.tilford(cc,root=seed)) + ### basic graph statistics trl = mean(transitivity(cc,type='local',isolates='zero')) |
