Learn R Programming

migraph (version 0.9.2)

edge: Identifying edges by certain properties

Description

Identifying edges by certain properties

Usage

edge_mutual(object)

edge_multiple(object)

edge_loop(object)

edge_betweenness(object)

edge_closeness(object)

Arguments

object

An object of a migraph-consistent class:

  • matrix, from base R

  • edgelist, a data frame from base R or tibble from tibble

  • igraph, from the igraph package

  • network, from the network package

  • tbl_graph, from the tidygraph package

Functions

  • edge_mutual: Identify edges that are mutual/reciprocated

  • edge_multiple: Identify edges that are multiples

  • edge_loop: Identify edges that are loops

  • edge_betweenness: Calculate number of shortest paths going through an edge

  • edge_closeness: Calculate the closeness of each edge to each other edge in the network.

Examples

Run this code
# NOT RUN {
edge_mutual(ison_algebra)
edge_multiple(ison_algebra)
edge_loop(ison_algebra)
(eb <- edge_betweenness(ison_adolescents))
plot(eb)
ison_adolescents %>% 
  activate(edges) %>% mutate(weight = eb) %>% 
  autographr()
(ec <- edge_closeness(ison_adolescents))
plot(ec)
ison_adolescents %>% 
  activate(edges) %>% mutate(weight = ec) %>% 
  autographr()
# }

Run the code above in your browser using DataLab