diff --git a/README.Rmd b/README.Rmd index 030f1c4..d514b65 100644 --- a/README.Rmd +++ b/README.Rmd @@ -104,7 +104,7 @@ out <- plot_infectsuscep(diffnet, bins = 20,K=5, logscale = FALSE, exclude.zeros ### Threshold -```{r, plot_threshold, fig.height=7} +```{r BoringThreshold, plot_threshold, fig.height=7} # Generating a random graph set.seed(123) diffnet <- rdiffnet(500, 20, @@ -120,7 +120,7 @@ plot_threshold(diffnet, vertex.cex = "degree") Using more features -```{r} +```{r NiceThreshold} data("medInnovationsDiffNet") size <- sqrt(1 + dgr(medInnovationsDiffNet)[,1]) set.seed(131) @@ -138,14 +138,14 @@ plot_threshold( ### Adoption rate -```{r} +```{r Adopters} plot_adopters(diffnet) ``` ### Hazard rate -```{r} +```{r Hazard} hazard_rate(diffnet) ``` diff --git a/README.md b/README.md index c14c7d9..4120e27 100644 --- a/README.md +++ b/README.md @@ -163,13 +163,32 @@ diffnet plot_threshold(diffnet, vertex.cex = .25) ``` -![](README_files/figure-markdown_github/plot_threshold-1.png) +![](README_files/figure-markdown_github/BoringThreshold,%20plot_threshold-1.png) ``` r plot_threshold(diffnet, vertex.cex = "degree") ``` -![](README_files/figure-markdown_github/plot_threshold-2.png) +![](README_files/figure-markdown_github/BoringThreshold,%20plot_threshold-2.png) + +Using more features + +``` r +data("medInnovationsDiffNet") +size <- sqrt(1 + dgr(medInnovationsDiffNet)[,1]) +set.seed(131) +plot_threshold( + medInnovationsDiffNet, + vertex.label = nodes(medInnovationsDiffNet), + vertex.cex = size/10, vertex.lab.pos = NULL, + vertex.lab.cex = size/4, + vertex.sides = medInnovationsDiffNet[["city"]] + 2, + sub = "Note: Vertices' sizes and shapes given by degree and city respectively", + jitter.factor = c(1,1), jitter.amount = c(.25,.025) +) +``` + +![](README_files/figure-markdown_github/NiceThreshold-1.png) ### Adoption rate @@ -177,7 +196,7 @@ plot_threshold(diffnet, vertex.cex = "degree") plot_adopters(diffnet) ``` -![](README_files/figure-markdown_github/unnamed-chunk-2-1.png) +![](README_files/figure-markdown_github/Adopters-1.png) ### Hazard rate @@ -185,7 +204,7 @@ plot_adopters(diffnet) hazard_rate(diffnet) ``` -![](README_files/figure-markdown_github/unnamed-chunk-3-1.png) +![](README_files/figure-markdown_github/Hazard-1.png) ### Diffusion process diff --git a/README_files/figure-markdown_github/Adopters-1.png b/README_files/figure-markdown_github/Adopters-1.png new file mode 100644 index 0000000..824cec0 Binary files /dev/null and b/README_files/figure-markdown_github/Adopters-1.png differ diff --git a/README_files/figure-markdown_github/BoringThreshold, plot_threshold-1.png b/README_files/figure-markdown_github/BoringThreshold, plot_threshold-1.png new file mode 100644 index 0000000..4e519c1 Binary files /dev/null and b/README_files/figure-markdown_github/BoringThreshold, plot_threshold-1.png differ diff --git a/README_files/figure-markdown_github/BoringThreshold, plot_threshold-2.png b/README_files/figure-markdown_github/BoringThreshold, plot_threshold-2.png new file mode 100644 index 0000000..1282b4b Binary files /dev/null and b/README_files/figure-markdown_github/BoringThreshold, plot_threshold-2.png differ diff --git a/README_files/figure-markdown_github/Hazard-1.png b/README_files/figure-markdown_github/Hazard-1.png new file mode 100644 index 0000000..7cf2e8c Binary files /dev/null and b/README_files/figure-markdown_github/Hazard-1.png differ diff --git a/README_files/figure-markdown_github/NiceThreshold-1.png b/README_files/figure-markdown_github/NiceThreshold-1.png new file mode 100644 index 0000000..c08dbca Binary files /dev/null and b/README_files/figure-markdown_github/NiceThreshold-1.png differ diff --git a/README_files/figure-markdown_github/plot_diffnet-1.png b/README_files/figure-markdown_github/plot_diffnet-1.png index 8d6599d..5868f3c 100644 Binary files a/README_files/figure-markdown_github/plot_diffnet-1.png and b/README_files/figure-markdown_github/plot_diffnet-1.png differ diff --git a/README_files/figure-markdown_github/plot_threshold-1.png b/README_files/figure-markdown_github/plot_threshold-1.png index fa1f0f0..4e519c1 100644 Binary files a/README_files/figure-markdown_github/plot_threshold-1.png and b/README_files/figure-markdown_github/plot_threshold-1.png differ diff --git a/README_files/figure-markdown_github/plot_threshold-2.png b/README_files/figure-markdown_github/plot_threshold-2.png index df449d0..1282b4b 100644 Binary files a/README_files/figure-markdown_github/plot_threshold-2.png and b/README_files/figure-markdown_github/plot_threshold-2.png differ diff --git a/README_files/figure-markdown_github/unnamed-chunk-2-1.png b/README_files/figure-markdown_github/unnamed-chunk-2-1.png index 0a8cefa..c08dbca 100644 Binary files a/README_files/figure-markdown_github/unnamed-chunk-2-1.png and b/README_files/figure-markdown_github/unnamed-chunk-2-1.png differ diff --git a/README_files/figure-markdown_github/unnamed-chunk-3-1.png b/README_files/figure-markdown_github/unnamed-chunk-3-1.png index c1b7f17..824cec0 100644 Binary files a/README_files/figure-markdown_github/unnamed-chunk-3-1.png and b/README_files/figure-markdown_github/unnamed-chunk-3-1.png differ