summaryrefslogtreecommitdiffstats
path: root/R Scripts/data-exploration.R
diff options
context:
space:
mode:
Diffstat (limited to 'R Scripts/data-exploration.R')
-rwxr-xr-xR Scripts/data-exploration.R7
1 files changed, 4 insertions, 3 deletions
diff --git a/R Scripts/data-exploration.R b/R Scripts/data-exploration.R
index f9617f9..16e7bba 100755
--- a/R Scripts/data-exploration.R
+++ b/R Scripts/data-exploration.R
@@ -28,9 +28,10 @@ S = data.frame(C_dat = trl,
S
##### Degree Distribution
-plot(degree.distribution(lcc)*vcount(lcc),log='xy',type='l',col='red',lwd=2,
- xlab='Degree', ylab='Number of Vertices', main='Degree Distribution')
-
+plot(1:max(degree(lcc)),degree.distribution(lcc)[-1]*vcount(lcc),
+ log='xy',col='#377EB8',pch=20,
+ xlab='Degree', ylab='Number of Vertices', main='')
+pl = power.law.fit(degree.distribution(lcc))
##### Victims
vic_ids = which(V(lcc)$vic==TRUE)