plot.compareShiny | R Documentation |
Uses qgraph
to plot networks. Accepts any number of networks and will organize the plots
in the number of side-by-side columns using the heuristic of taking the square root of the number of
input and rounding down to the nearest integer (i.e., floor(sqrt(length(input)))
).
Performs the same operations as compare_nets
Examples
3 networks: 1 x 3
6 networks: 2 x 3
9 networks: 3 x 3
## S3 method for class 'compareShiny'
plot(x, ...)
x |
Shiny result |
... |
Additional arguments |
Plots networks using qgraph
Alexander Christensen <alexpaulchristensen@gmail.com>
Epskamp, S., Cramer, A. O. J., Waldorp, L. J., Schmittmann, V. D., & Borsboom, D. (2012). qgraph: Network visualizations of relationships in psychometric data. Journal of Statistical Software, 48, 1-18.
Jones, P. J. (2019). networktools: Tools for Identifying Important Nodes in Networks. R package version 1.2.1.
Jones, P. J., Mair, P., & McNally, R. (2018). Visualizing psychological networks: A tutorial in R. Frontiers in Psychology, 9, 1742.
# Simulate Datasets
one <- sim.fluency(10)
two <- sim.fluency(10)
# Compute similarity matrix
cos1 <- similarity(one, method = "cosine")
cos2 <- similarity(two, method = "cosine")
# Compute networks
net1 <- TMFG(cos1)
net2 <- TMFG(cos2)
# Compare networks
compare_nets(net1, net2, title = list("One", "Two"), config = "spring")
# Change edge colors
compare_nets(net1, net2, title = list("One", "Two"),
config = "spring", qgraph.args = list(edge.color = "blue"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.