987209.fig.007
Figure 7: Pseudocode of the R approach.