+9  A: 

The secret to happiness in ggplot2 is to put everything in the "long" (or what I guess matrix oriented people would call "sparse") format:

df <- rbind(data.frame(x="n",value=n),
            data.frame(x="a",value=a),
            data.frame(x="p",value=p))
qplot(value, colour=x, data=df, geom="density")

If you don't want colors:

qplot(value, group=x, data=df, geom="density")
Eduardo Leoni
you made my night so much better. I was struggling with this and could not figure it out. Thank you so much.
JD Long