Learn R Programming

pathdiagram (version 0.1.9.1)

manifest: Set specifications of a manifest variable

Description

Use this function to specify the graphic characteristics of a manifest variable. The specifications will be used by the function draw to plot manifest variables (in a path diagram).

Usage

manifest(label = "manifest", x = 0.5, y = 0.5,
    width = NULL, height = 0.1, border = "white",
    fill = "#9dbafa", lwd = 1, col = "gray20", cex = 1,
    vfont = NULL, font = 1, family = "sans")

Arguments

label

A character string with the label to be displayed.

x

x-axis coordinate for center of rectanlge.

y

y-axis coordinate for center of rectangle.

width

width of the rectangle.

height

height of the rectangle.

border

color of the border.

fill

color to fill the rectangle.

lwd

width of the border.

col

color of the label.

cex

numeric character expansion of the label.

vfont

font family of the label.

font

An integer specifying which font to use for the label. See par

family

The name of a font family for drawing text. Standard values are "serif", "sans" and "mono".

Value

An object of class "manifest", which is a list with the specified parameters to draw manifest variables.

Details

Manifest variables are drawn as rectangles.

See Also

latent, draw

Examples

Run this code
# NOT RUN {
 # manifest variables
 eggs = manifest("eggs", x=0.3, y=0.7, width=NULL, height=0.08)
 milk = manifest("milk", x=0.4, y=0.6, width=NULL, height=0.08)
 flour = manifest("flour", x=0.5, y=0.5, width=NULL, height=0.08)
 sugar = manifest("sugar", x=0.6, y=0.4, width=NULL, height=0.08)
 butter = manifest("butter", x=0.7, y=0.3, width=NULL, height=0.08)

 # open wall
 wall()
 title("Five manifest variables", col.main="gray20")

 # draw manifest variables
 draw(eggs)
 draw(milk)
 draw(flour)
 draw(sugar)
 draw(butter)
 
# }

Run the code above in your browser using DataLab