Description Usage Arguments Value Examples
plot_nodes
1 | plot_nodes(x, y, cex = 0.2, h = 1, w = 1, ...)
|
x |
Vector of x coords with recommended min/max of -.75 to .75. |
y |
Vector of y coords with recommended min/max of -.75 to .75. |
cex |
Size of nodes defaults to .2 |
h |
height of plot defaults to 1. |
w |
width of plot defaults to 1. |
... |
Other args passed on to symbols(). |
Node diagram
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | cex <- .25
plot_nodes(c(-.75, -.75, -.75, 0, .75, .75),
c(-.75, 0, .75, 0, -.5, .5),
cex = cex)
draw.arrow(-.75, -.75, 0, 0, cex)
draw.arrow(-.75, 0, 0, 0, cex)
draw.arrow(-.75, .75, 0, 0, cex)
draw.arrow( 0, 0, .75, .5, cex)
draw.arrow( 0, 0, .75, -.5, cex)
text(-.75, .75, "Education")
text(-.75, 0, "Age")
text(-.75, -.75, "Race")
text(0, 0, "Political\nEngagement")
text(.75, .5, "Political\nParticipation")
text(.75, -.5, "Civic\nEngagement")
## mediation model
cex <- .35
plot_nodes(c(-1.5, 0, 1.5), c(-.5, .5, -.5),
w = 1.5, h = 1, cex)
draw.arrow(-1.5, -.5, 1.5, -.5, cex)
draw.arrow(-1.5, -.5, .0 , .5, cex)
draw.arrow( 0, .5, 1.5, -.5, cex)
text(-1.5, -.5, "x")
text(0, .5, "w")
text(1.5, -.5, "y")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.