matrixPlot: Draw matrix plot

View source: R/matrixPlot.R

matrixPlotR Documentation

Draw matrix plot

Description

Draw matrix plot

Usage

matrixPlot(
  matrix = c(1, 1, 1, 0, 0, 1),
  radx = 0.1,
  rady = 0.05,
  xlim = NULL,
  ylim = NULL,
  labels = NULL
)

Arguments

matrix

A numeric vector

radx

horizontal radius of the box.

rady

vertical radius of the box.

xlim

the x limits (min,max) of the plot

ylim

the y limits (min,max) of the plot

labels

Optional list of labels

Examples

matrixPlot(c(1,1,1))
labels=list(X="X",M=c("M1","M2"),Y="Y")
bmatrix=c(1,1,1,0,0,1)
eq=multipleMediation(labels=labels,bmatrix=bmatrix,mode=1)
drawModel(equation=eq,labels=labels,nodemode=2)
matrixPlot(bmatrix)
bmatrix=c(1,1,0,1,0,0,1,1,1,1)
matrixPlot(c(1,1,0,1,0,0,1,1,1,1))
labels=list(X="X",M=c("M1","M2","M3"),Y="Y")
eq=multipleMediation(labels=labels,bmatrix=bmatrix,mode=1)
drawModel(equation=eq,labels=labels,parallel=TRUE,nodemode=2)
labels=list(X="indep",M=c("med1","med2"),Y="dep")
matrixPlot(c(1,1,1,0,0,1),labels=labels)

processR documentation built on Jan. 23, 2023, 5:44 p.m.