Skip to content

Commit 132046a

Browse files
committed
Update readme
1 parent 4a061c6 commit 132046a

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

README.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use in a tidy workflow.
3232
```{r, message=FALSE}
3333
library(tidygraph)
3434
35-
play_erdos_renyi(10, 0.5) %>%
35+
play_gnp(10, 0.5) %>%
3636
activate(nodes) %>%
3737
mutate(degree = centrality_degree()) %>%
3838
activate(edges) %>%

README.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,33 +25,37 @@ workflow.
2525
``` r
2626
library(tidygraph)
2727

28-
play_erdos_renyi(10, 0.5) %>%
28+
play_gnp(10, 0.5) %>%
2929
activate(nodes) %>%
3030
mutate(degree = centrality_degree()) %>%
3131
activate(edges) %>%
3232
mutate(centrality = centrality_edge_betweenness()) %>%
3333
arrange(centrality)
34-
#> # A tbl_graph: 10 nodes and 57 edges
34+
#> # A tbl_graph: 10 nodes and 47 edges
3535
#> #
3636
#> # A directed simple graph with 1 component
3737
#> #
38-
#> # A tibble: 57 × 3
39-
#> from to centrality
40-
#> <int> <int> <dbl>
41-
#> 1 4 3 1.31
42-
#> 2 6 3 1.33
43-
#> 3 8 5 1.33
44-
#> 4 8 2 1.34
45-
#> 5 9 2 1.34
46-
#> 6 7 3 1.37
47-
#> # ℹ 51 more rows
38+
#> # Edge Data: 47 × 3 (active)
39+
#> from to centrality
40+
#> <int> <int> <dbl>
41+
#> 1 5 8 1
42+
#> 2 3 6 1.2
43+
#> 3 5 9 1.2
44+
#> 4 10 1 1.25
45+
#> 5 3 8 1.25
46+
#> 6 4 1 1.33
47+
#> 7 5 1 1.33
48+
#> 8 5 6 1.33
49+
#> 9 5 10 1.5
50+
#> 10 6 8 1.5
51+
#> # ℹ 37 more rows
4852
#> #
49-
#> # A tibble: 10 × 1
53+
#> # Node Data: 10 × 1
5054
#> degree
5155
#> <dbl>
52-
#> 1 5
53-
#> 2 4
54-
#> 3 6
56+
#> 1 4
57+
#> 2 5
58+
#> 3 7
5559
#> # ℹ 7 more rows
5660
```
5761

0 commit comments

Comments
 (0)