Plot Compartment Model Diagram
It plots the diagrom of a comparment model.
pComp(dComp, dRate, Shape="rect", Col=NA, Bx=0.3, By=0.2, Cex=1.0, Lwd=3, Radius=0.3, thIn=pi/2, thOut=pi/2, ...)
dComp
: data.frame for a compartment model. See the example.dRate
: data.frame for rate information. See the example.Shape
: rectangle or cricleCol
: filling colorBx
: half width of compartment boxBy
: half height of compartment boxCex
: character expansionLwd
: line widthRadius
: radius of compartment circlethIn
: Input angle in radianthOut
: Output angle in radian...
: arguments to be passed to plot
functionFlow direction is from the top to bottom.
It plots.
Kyun-Seop Bae k@acr.kr
dA = data.frame(No = c(1, 2, 3, 4), Name=c("Gut Depot", "Skin Depot", "Central", "Peripheral"), Level=c(1, 1, 2, 2), xPos=c(-0.5, 0.5, 0, 1)) dB = data.frame(From = c(1, 2, 3, 4, 3, 0, 0), To=c(3, 3, 4, 3, 5, 1, 2), Name=c("KA", "KA2", "K12", "K21", "CL", "F1", "F2")) pComp(dA, dB) #par(oma=c(0, 0, 0, 0), mar=c(0, 0, 1, 0)) # If need, adjust margin before calling pComp(dA, dB, "circ", main="Compartmental Model Diagram") pComp(dA, dB, "circ", main="Compartmental Model Diagram", Col="#DDEEFF", asp=1)