arrow: Plot arrow between variables

Description Usage Arguments Author(s) See Also Examples

Description

Use this function to draw connecting arrows between manifest and latent variables.

Usage

1
2
3
  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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## 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)

gastonstat/pathdiagram documentation built on May 16, 2019, 5:46 p.m.