Learn R Programming

pathdiagram (version 0.1.9.1)

wall: Open a new frame for a path diagram

Description

Use this function to open a white canvas to start drawing a path diagram. By default, wall opens a new plot window from 0 to 1 in both axes.

Usage

wall(xlim = c(0, 1), ylim = c(0, 1), xpd = TRUE, ...)

Arguments

xlim

Numeric vector of length 2 giving the x coordinate range. Default xlim = c(0, 1).

ylim

Numeric vector of length 2 giving the y coordinate range. Default ylim = c(0, 1).

xpd

Logical value to indicate if all plotting is clipped to the figure region. The default is c(1, 1, 1, 1).

...

other graphical arguments passed on to plot.window.

Details

wall calls plot.new() and plot.window() to open a new plot frame.

See Also

manifest, latent, draw

Examples

Run this code
# 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 diagram
 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")
 
# }

Run the code above in your browser using DataLab