plot(d1,main="",xlab="")
lines(d2)
First, we compute nonparametric density estimates from the two vari-
ables, saving them in objectsd1andd2for later use. We then callplot()to
draw the curve for exam 1, at which point the plot looks like Figure 12-3. We
then calllines()to add exam 2’s curve to the graph, producing Figure 12-4.
Figure 12-3: Plot of first density
Figure 12-4: Addition of second density
Graphics 265