Small example on making flow charts.

Here is the code to make a PDCA diagram.

par(mar = c(1, 1, 1, 1), mfrow = c(2, 2))
names <- c("ACT", "CHECK", "PLAN", "DO")
M <- matrix(nrow = 4, ncol = 4, byrow = TRUE, data = 0)

## vector going between A-B (nr2-nr1); between D-B (nr4-nr2); etc.
M[3,1] <- M[4,3] <- M[2,4] <- M[1,2] <- "flow"

plotmat(M, pos = c(1,2,1), curve = 0, name = names, lwd = 1, 
        box.lwd = 2, cex.txt = 0.8, box.type = "circle", box.prop = 1.0)

Here a flow chart

## prepare objects, 13 in total (2 invisible):
par(mar = c(1, 1, 1, 1))
openplotmat()
## nr of objects on each row:
elpos  <- coordinates (c(1, 1, 1, 1, 3, 1, 1, 3, 1), relsize = 1)
## create arrows between the objects:
fromto <- matrix(ncol = 2, byrow = TRUE, data = c(1, 2, 
                                                  2, 3, 
                                                  3, 4,
                                                  4, 6,
                                                  6, 7, 
                                                  6, 8, 
                                                  7, 8, 
                                                  8, 9, 
                                                  9, 11, 
                                                  11, 12,
                                                  12, 13,
                                                  11, 13))
nr     <- nrow(fromto)
arrpos <- matrix(ncol = 2, nrow = nr)
for (i in 1:nr) arrpos[i, ] <- straightarrow (to = elpos[fromto[i, 2], ], 
                                              from = elpos[fromto[i, 1], ], 
                                              lwd = 2, arr.pos = 0.6, arr.length = 0.3)


## make text boxes
textrect(elpos[1,], 0.15, 0.025, lab = "Create folders in EDRMS and Outlook", box.col = "green", cex = 0.5)
textrect(elpos[2,], 0.075, 0.025, lab = "Nomination of SA", box.col = "gold", cex = 0.5)
textrect(elpos[3,], 0.075, 0.025, lab = "Contract with SA", box.col = "gold", cex = 0.5)
textrect(elpos[4,], 0.075, 0.025, lab = "Final study outline", box.col = "gold", cex = 0.5)
textdiamond(elpos[6,], 0.10, 0.05, lab = "External production?", box.col = "gold", cex = 0.5)
textrect(elpos[7,], 0.07, 0.03, lab = c("Contract with", "external producer"), box.col = "purple", cex = 0.5)
textrect(elpos[8,], 0.15, 0.025, lab = "Preparation of production protocol", box.col = "gold", cex = 0.5)
textrect(elpos[9,], 0.15, 0.025, lab = "Procurement of material", box.col = "gold", cex = 0.5)
textdiamond(elpos[11,], 0.10, 0.05, lab = c("Need for","feasibility","study?"), box.col = "gold", cex = 0.5)
textrect(elpos[12,], 0.06, 0.03, lab = c("feasibility", "study"), box.col = "purple", cex = 0.5)
textrect(elpos[13,], 0.15, 0.025, lab = "Stability assessment", box.col = "gold", cex = 0.5)