Created
June 19, 2019 08:53
-
-
Save SachaEpskamp/442f9ca7c1ed2286d13b3a5a820e8f5c to your computer and use it in GitHub Desktop.
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
# Load network: | |
library("maps") | |
library("qgraph") | |
map("world", fill=TRUE, col="white", bg="lightblue", ylim=c(-60, 90), mar=c(0,0,0,0)) | |
# Some network with 4 nodes: | |
Adj <- matrix(1,4,4) | |
# Layout using coordinates: | |
Layout <- matrix(c( | |
4.9036, 52.3680,, # Amsterdam | |
103.8198, 1.3521, , # Singapore | |
-74.0060, 40.7128, , # New york | |
-58.3816, -34.6037, # Buenos Aires | |
),,2,byrow=TRUE) | |
# Plot network: | |
map("world", fill=TRUE, col="white", bg="lightblue", ylim=c(-60, 90), mar=c(0,0,0,0)) | |
qgraph(Adj, labels = FALSE, layout= Layout[,2:1], color = "black", edge.color = "black", | |
plot = FALSE, rescale = FALSE, usePCH = TRUE, vsize = 5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment