Last active
June 24, 2021 08:16
-
-
Save jinhangjiang/236b656ccd0870bfcfe87e6cdb0010d9 to your computer and use it in GitHub Desktop.
igraph graph.formula
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Create undirected graphs | |
g <- graph_from_literal(1-2, 1-3, 1-7, 3-4, 2-3, 2-4, 3-5, 4-5, 4-6, 4-7, 5-6, 5-8, 6-7, 7-8) | |
## Create directed graphs using addition or substraction operators | |
dg <- graph_from_literal(JFK-+PEK, JFK-+CDG, PEK++CDG) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment