Last data update: 2014.03.03
|
R: Plot arrow between variables
Plot arrow between variables
Description
Use this function to draw connecting arrows between
manifest and latent variables.
Usage
arrow(from, to, start = "east", end = "west",
length = 0.1, angle = 10, code = 2, col = "#d2def1",
lwd = 3, ...)
Arguments
from |
An object of either class "manifest"
or "latent" . This object is the origin of the
arrow.
|
to |
An object of either class "manifest" or
"latent" . This object is the destination of the
arrow.
|
start |
Character string to specify the starting
direction of the arrow. Options are "north" ,
"south" , "east" , "west" .
|
end |
Character string to specify the ending
direction of the arrow. Options are "north" ,
"south" , "east" , "west" .
|
length |
length of the edges of the arrow head (in
inches).
|
angle |
angle from the shaft of the arrow to the
edge of the arrow head.
|
code |
integer code, determining kind of arrows to
be drawn.
|
col |
color of the arrow.
|
lwd |
width of the arrow.
|
... |
other arguments passed on to arrows .
|
Author(s)
Gaston Sanchez
See Also
manifest , latent ,
draw
Examples
## Not run:
# latent variables
attack = latent("ATTACK", x=0.35, y=0.7, rx=0.08, ry=0.06)
defense = latent("DEFENSE", x=0.35, y=0.3, rx=0.08, ry=0.06)
success = latent("SUCCESS", x=0.65, y=0.5, rx=0.08, ry=0.06)
# open wall
wall()
# draw latent variables
draw(attack)
draw(defense)
draw(success)
# add arrows
arrow(from=attack, to=success, start="east", end="west")
arrow(from=defense, to=success, start="east", end="west")
## End(Not run)
Results
|