matrixPlot | R Documentation |
Draw matrix plot
matrixPlot(
matrix = c(1, 1, 1, 0, 0, 1),
radx = 0.1,
rady = 0.05,
xlim = NULL,
ylim = NULL,
labels = NULL
)
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 |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.